资讯

展开

nginx配置请求转发

作者:快盘下载 人气:

windows中;

启动:nginx.exe 
关闭:nginx.exe -s stop

nginx配置请求转发

配置nginx.conf;
默认的80端口容易冲突;切换81或其他

listen       81;


http里面配置信息;

 server {
        listen       9001;
        server_name  localhost;

        location ~ /eduservice/ {
            proxy_pass  http://localhost:8001;
        }
        location ~ /eduoss/ {
            proxy_pass  http://localhost:8002;
        }

测试
启动项目;F12查看url;发现是配置的端口9001;配置请求转发成功

nginx配置请求转发

加载全部内容

相关教程
猜你喜欢
用户评论
快盘暂不提供评论功能!