1. 程式人生 > >nginx安裝、監控、設置反向代理

nginx安裝、監控、設置反向代理

ces off pro con header 設置 war ade with

#監控
location /status {
stub_status on;
access_log off;
}

#代理
location / {
proxy_pass http://10.1.2.170:8081/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

#linux 重新編譯
./configure --with-http_stub_status_module
make
make install

nginx安裝、監控、設置反向代理