本地配置nginx代理

server {
	listen       80;
	server_name  localhost;

	charset utf8;

	#access_log  logs/host.access.log  main;

	location / {
		proxy_pass   http://localhost:63342/app/; //本地打開文件(配合webstorm)
		#root   html;
		#index  index.html index.htm;
	}

	location /apis {
		rewrite  ^.+apis/?(.*)$ /$1 break;		
		proxy_pass http://127.0.0.1:8080;	//接口的ip
		
	 
	}
	.
	.
	.
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章