nginx部署页面无法访问问题

nginx.conf配置:

 server {
            listen       9111;
            server_name  localhost;

	        location / {
	            root	/home/3d;
		        #root	/usr/local/nginx/dist;
	            index	index.html;
	        }
     
            location = /50x.html {
                root   html;
            }

        }

代码配置:

# 某某管理平台/生产环境
VUE_APP_BASE_API = 'http://127.0.0.1:9111/api'

#3D路径地址
VUE_APP_3D_API = 'http://127.0.0.1:9111/3d'

代码中配置的是9111端口,nginx中配置的监听端口要跟代码中配置端口保持一致才能访问

猜你喜欢

转载自blog.csdn.net/Tom_sensen/article/details/112003194