nginx的首页指向配置

server {
listen 80;
server_name dev.oss.hsh.xxx.com;
gzip on;
gzip_min_length 1k;
gzip_comp_level 9;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
gzip_disable “MSIE [1-6].”;

root /data/application/sc_vote_activity;

location / {

    try_files $uri $uri/ /index.html;

}
location /vote_activity {
    proxy_pass http://vote_activity;
    proxy_set_header   X-Forwarded-Proto $scheme;
    proxy_set_header   Host              $http_host;
    proxy_set_header   X-Real-IP         $remote_addr;
    client_max_body_size 30M;
}

}

upstream vote_activity{
server 127.0.0.1:8801;
keepalive 1024;
}

发布了161 篇原创文章 · 获赞 31 · 访问量 26万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览