Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

运行app.js,无法正确运行 #11

Open
xuelainiao opened this issue Jul 21, 2018 · 5 comments
Open

运行app.js,无法正确运行 #11

xuelainiao opened this issue Jul 21, 2018 · 5 comments

Comments

@xuelainiao
Copy link

xuelainiao commented Jul 21, 2018

尝试了9000端口,得到结果是:
default

求解

@xuelainiao
Copy link
Author

使用的是国内阿里云服务器

@xuelainiao
Copy link
Author

搜索“Victory” 似乎没反应,但是敲错这个单词反而有反应

@mzz2017
Copy link
Owner

mzz2017 commented Aug 16, 2018

app.js启动的是后端服务,你现在在生产部署吗,需要用nginx将前端和后端映射到同一个端口才能访问

@thathooo
Copy link

thathooo commented Apr 5, 2019

app.js启动的是后端服务,你现在在生产部署吗,需要用nginx将前端和后端映射到同一个端口才能访问

@mzz2017

大佬,我刚接触nginx,不太知道怎么把前后端映射到同一端口,甚至不知道前后端的位置分别在哪儿……
看了一下你贴的vue-router开启HTML5的history模式后nginx配置的那个nginx配置
但是也不太懂,下边是我的配置,能帮忙看一下吗?

git clone/var/musicman
nginx配置如下:

server
{
listen 80;
server_name www.mysite.xyz;
charset utf-8;
root /var/musicman;

location /var/musicman {
	index index.html index.htm;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto $scheme;
	proxy_set_header Host $http_host;
	proxy_set_header X-NginX-Proxy true;
	proxy_pass http://xx.xx.xx.xx:9000;
	proxy_redirect off;

	proxy_http_version 1.1;
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection "upgrade";
 }
}

@FFFcat
Copy link

FFFcat commented Jun 27, 2019

app.js启动的是后端服务,你现在在生产部署吗,需要用nginx将前端和后端映射到同一个端口才能访问

改了app.js和docker的端口和app.js的代理 docker run的时候也是改后端口:改后端口,还是会出现这样的问题。。还有大佬的展示站是关了?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants