Senaite在localhost:8080上运行。现在,我想把它服务于其他人。我已经为https设置了Nginx。使用
location / {
proxy_pass http://localhost:8080/;
}我可以访问使主页可访问,但senaite生成的链接都指向在生成的html中硬编码的localhost:8080。我可以在哪里更改它,以便显示我的服务器地址或相对链接?
发布于 2019-12-10 22:50:07
如果Senaite在端口8080上运行在127.0.0.1下,并被配置为在"senaite“下服务lims,则nginx配置如下:
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^(.*)$ /VirtualHostBase/$scheme/$host/senaite/VirtualHostRoot/$1 break;
proxy_pass http://127.0.0.1:8080;https://stackoverflow.com/questions/59094754
复制相似问题