我正在尝试将 nginx 设置为反向代理,以路由apps.mycompany.com/gitlab
到与 nginx 在同一服务器上运行的 gitlab docker 容器:
nginx 配置有:
location /gitlab/ {
proxy_pass http://127.0.0.1:3000/;
proxy_redirect default;
}
Run Code Online (Sandbox Code Playgroud)
第一个 http 调用apps.mycompany.com/gitlab
进行得很顺利,但基本上 html 内的所有 href(例如href:"/assets/..."
)仍然路由到apps.mycompany.com/assets/...
而不是apps.mycompany.com/gitlab/assets/...
所以没有找到assets和css文件。渲染的页面有结构,但没有样式,我什至不知道还有什么不起作用。
我对 nginx 不太了解,不知道我做错了什么