[GH-ISSUE #3090] NGINX Proxy Manager, Code-Server and Hugo (Reverse proxy a subdomain to a folder?) #2092

Closed
opened 2026-02-26 07:34:00 +03:00 by kerem · 1 comment
Owner

Originally created by @joergklein on GitHub (Jul 31, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3090

This is a question.

I have a development server running in a VM. I use the code server, i.e. VS Code. The VM runs not only VS Code, but also Golang, R, Tex Live, Portainer, NGINX Proxy Server and Hugo (static site generator).

I have created documentation for this. https://github.com/joergklein/code-server.

When I start Hugo server, it shows http://localhost:1313 in the terminal. If the link is executed with the browser, http://localhost:1313 is redirected to the domain dev.example.com/proxy/1313/. The html page is displayed, unfortunately without css and the images. How do I create a redirect so that Hugo server also displays the css and images? dev.example.com is a subdomain with an A record. In this subdomain the code server is running.

The problem is that the style URL should be /proxy/1313/scss/styles.scss (in this case) not /scss/styles.scss, to fix this, specify the sub-path to match the nginx-proxy given may help.

Originally created by @joergklein on GitHub (Jul 31, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3090 This is a question. I have a development server running in a VM. I use the code server, i.e. VS Code. The VM runs not only VS Code, but also Golang, R, Tex Live, Portainer, NGINX Proxy Server and Hugo (static site generator). I have created documentation for this. https://github.com/joergklein/code-server. When I start Hugo server, it shows http://localhost:1313 in the terminal. If the link is executed with the browser, http://localhost:1313 is redirected to the domain dev.example.com/proxy/1313/. The html page is displayed, unfortunately without css and the images. How do I create a redirect so that Hugo server also displays the css and images? dev.example.com is a subdomain with an A record. In this subdomain the code server is running. The problem is that the style URL should be /proxy/1313/scss/styles.scss (in this case) not /scss/styles.scss, to fix this, specify the sub-path to match the nginx-proxy given may help.
kerem closed this issue 2026-02-26 07:34:00 +03:00
Author
Owner

@joergklein commented on GitHub (Jul 31, 2023):

I found a very simple solution.

config.yaml

relativeURLs: true

<!-- gh-comment-id:1658092155 --> @joergklein commented on GitHub (Jul 31, 2023): I found a very simple solution. config.yaml `relativeURLs: true`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2092
No description provided.