nginx配置
作者:
西安小哥 | 来源:发表于
2017-04-10 09:58 被阅读67次server {
listen 9004;#less访问地址
server_name localhost;
index index.html index.htm index.php;
autoindex on;
ssi on;
limit_rate 2000k;
client_max_body_size 2048m;
location ~* .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css|less|exe|svg|map|json)$ {
root E:/myBox; #服务指向的地址,跳转到index.html
index index.html index.htm;#以上正则表达式表示,允许请求的资源类型。否则会404错误
}
location ^~ /manage/ {
proxy_pass http://xxx;#代理服务指向的地址
proxy_redirect default;
proxy_cookie_path /vdtcc/ /;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host:$server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
本文标题:nginx配置
本文链接:https://www.haomeiwen.com/subject/szfsattx.html
网友评论