代码配置详情nginx.conf
` server {
listen 80;
server_name ad.bjhxsm.net;
#charset koi8-r;
#access_log logs/host.access.log main;
location /page {
root /usr/local;
index index.html index.htm;
}
location / {
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
server_name ad.cnqywin.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location /page {
root /usr/local;
index index.html index.htm;
}
location / {
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
`
- 邮箱:ithelei@sina.cn
- GoodLuck