nginx 配置样式

#
# A virtual host using mix of IP-, name-, and port-based configuration
#

server {
	listen       80;
	server_name  test.jiayuan.aomygod.com;

	location / {
		root     /app/svr/server/html;
	}

	error_page 404 /404.html;
	location = /40x.html {
	}

	error_page 500 502 503 504 /50x.html;
	location = /50x.html {
	}





	location /home {
		alias   /app/svr/server/jiayuan_home;
		index  index.html index.htm;
	}

	location /wechats {
		rewrite ^/wechats/(.*) /$1 break;
		proxy_pass http://127.0.0.1:10060;    
		proxy_set_header X-Real-IP $remote_addr;	
	}

	 location /nexus {
                proxy_pass http://10.249.200.23:8081/nexus;
	            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;       
	
	 }



        location /beautiful-district {
                proxy_set_header X-Real-IP $remote_addr;
		expires -1;
                add_header Cache-Control no-cache;
                alias   /app/svr/server/web/district/district/dist;
	        index  index.html index.htm;
		#try_files $uri $uri/ /app/svr/server/web/district/index.html;
               
        }		


	 location /beautiful-district-vote {
                proxy_set_header X-Real-IP $remote_addr;
                expires -1;
                add_header Cache-Control no-cache;
                alias   /app/svr/server/web/district-vote/district_vote/dist;
                index  index.html index.htm;
                #try_files $uri $uri/ /app/svr/server/web/district/index.html;

        }


	 location /district-api {
                proxy_pass http://127.0.0.1:11000/;
                proxy_set_header X-Real-IP $remote_addr;

        }
	location /jyh5 {
		rewrite ^/jyh5/h5-api/(.*) /h5-api/$1 break;
		proxy_pass http://127.0.0.1:6080/h5-api/;
		proxy_set_header X-Real-IP $remote_addr;

	}

	
	
	location /merchant-sale-report {
        #        rewrite ^/u/(.*) /h5-api/$1 break;
                proxy_pass http://127.0.0.1:10002/;
                proxy_set_header X-Real-IP $remote_addr;

        }


        location /jiangmen-sale-report {
                client_max_body_size 20M;
		 expires -1;
                add_header Cache-Control no-cache;
                alias   /app/svr/server/web/merchant-report/merchant-sale-project/dist;
                try_files $uri $uri/ /jiangmen-sale-report/index.html;
        }


	

	location /panyu-mp-points {
		 expires -1;
		add_header Cache-Control no-cache;
		alias   /app/svr/server/web/panyu-mp-points/mp-points/dist;
		index  index.html index.htm;
		try_files $uri $uri/ /panyu-mp-points/index.html;
	}


        location /mp-points {
                 expires -1;
                add_header Cache-Control no-cache;
                alias   /app/svr/server/web/mp-points/dist;
                index  index.html index.htm;
                try_files $uri $uri/ /mp-points/index.html;
        }

        location /oauth-mp-points {
                alias   /app/svr/server/web/oauth-mp-points/mp-points/dist;
                index  index.html index.htm;
                try_files $uri $uri/ /oauth-mp-points/index.html;
        }

	location /wechat-code {
                alias   /app/svr/server/web/wechat-code;
                index  index.html index.htm;
        }


}



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值