22 lines
714 B
Plaintext
22 lines
714 B
Plaintext
# 此配置针对本地nginx
|
||
server {
|
||
listen 80;
|
||
server_name hccz.pcxbc.com;
|
||
index index.php index.html index.htm;
|
||
access_log /dev/null;
|
||
error_log /www/wwwlogs/hccz.error.log warn;
|
||
|
||
# redirect server error pages to the static page /50x.html
|
||
#
|
||
#error_page 500 502 503 504 /50x.html;
|
||
|
||
location / {
|
||
#如果服务器要获取客户端真实IP,可以用下三句设置主机头和客户端真实地址
|
||
proxy_set_header Host $http_host;
|
||
proxy_set_header X-Real-IP $remote_addr;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
proxy_set_header X-Forwarded-Proto $scheme;
|
||
# rewrite ^/api/(.*)$ /$1 break; #重写
|
||
proxy_pass http://localhost:8085;
|
||
}
|
||
} |