Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leanote配置Nginx转发,静态资源加载使用相对路径的问题 #916

Open
Angryshark128 opened this issue Oct 6, 2019 · 0 comments

Comments

@Angryshark128
Copy link

commented Oct 6, 2019

**环境:**Linux Nginx Leanote-2.4

环境已安装就绪,且直接通过 http://域名:非80端口访问正常,但配置Nginx转发后,无法加载图片 JS CSS文件这些静态资源,查看后台访问使用的是http://域名/js/*.js,也就是说使用的是Nginx80端口的根目录,请问该如何解决这个问题呢,难道要把对应的html加载路径全都修改了?

Nginx核心配置为:
location /note {
proxy_pass http://127.0.0.1:20000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.