[GH-ISSUE #1063] proxy host example.internal:8080/folder #890

Closed
opened 2026-02-26 06:34:49 +03:00 by kerem · 7 comments
Owner

Originally created by @gent99 on GitHub (May 5, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1063

Hello,

i'd like to ask, what to do, if i want to proxy host "example.com" to "http://example.intern:8080/folder"

the "folder" is important there as i can not reach "http://example.intern:8080" itself. Can this be done with npm and how? I tried different things, but always get bad-gateway. (of course the domains above are just an example for this question)

Kind regards

Originally created by @gent99 on GitHub (May 5, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1063 Hello, i'd like to ask, what to do, if i want to proxy host "example.com" to "http://example.intern:8080/folder" the "folder" is important there as i can not reach "http://example.intern:8080" itself. Can this be done with npm and how? I tried different things, but always get bad-gateway. (of course the domains above are just an example for this question) Kind regards
kerem 2026-02-26 06:34:49 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@gent99 commented on GitHub (May 5, 2021):

is it correct that there has to be a favicon.ico accessible with a get request in the root of the upstream-folder?

I see this in the error.log:

2021/05/05 11:47:35 [error] 6932#6932: *167670 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.214.100, server: example.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://example.intern:8080/folder/favicon.ico", host: "example.com", referrer: "http://example.com/"

<!-- gh-comment-id:832630752 --> @gent99 commented on GitHub (May 5, 2021): is it correct that there has to be a favicon.ico accessible with a get request in the root of the upstream-folder? I see this in the error.log: 2021/05/05 11:47:35 [error] 6932#6932: *167670 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.214.100, server: example.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://example.intern:8080/folder/favicon.ico", host: "example.com", referrer: "http://example.com/"
Author
Owner

@p-fruck commented on GitHub (May 6, 2021):

Hi, if you experience issues like this, please give others information about your config, since it's really hard to troubleshoot otherwise.
I had a similar answer here, maybe this might help you too. Add a custom subfolder, set the location to / and redirect it to example.intern/folder on port 8080

<!-- gh-comment-id:833585722 --> @p-fruck commented on GitHub (May 6, 2021): Hi, if you experience issues like this, please give others information about your config, since it's really hard to troubleshoot otherwise. I had a similar answer [here](https://github.com/jc21/nginx-proxy-manager/issues/1029#issuecomment-831203491), maybe this might help you too. Add a custom subfolder, set the location to `/` and redirect it to example.intern/folder on port 8080
Author
Owner

@gent99 commented on GitHub (May 6, 2021):

In the linked answer above, there was an information about putting the complete nginx configuration for the subfolder in the advanced tab, not only the additional settings i'd like to use. So whenever i need advanced config, i have to put the whole part for the config into the advanced tab like so:

location / {
        proxy_pass https://wherever/i/have/my/internal.domain/folder;
        proxy_redirect off;
        add_header Content-Type text/plain;
    }


and not just this:

        proxy_redirect off;
        add_header Content-Type text/plain;

Is this correct?

<!-- gh-comment-id:833696321 --> @gent99 commented on GitHub (May 6, 2021): In the linked answer above, there was an information about putting the complete nginx configuration for the subfolder in the advanced tab, not only the additional settings i'd like to use. So whenever i need advanced config, i have to put the whole part for the config into the advanced tab like so: ``` location / { proxy_pass https://wherever/i/have/my/internal.domain/folder; proxy_redirect off; add_header Content-Type text/plain; } ``` and not just this: ``` proxy_redirect off; add_header Content-Type text/plain; ``` Is this correct?
Author
Owner

@p-fruck commented on GitHub (May 6, 2021):

Well, kind of. You are referring to the current last post within the issue. But what I meant is the specific answer in the issue that I have linked to. Basically, if you adapt the answer to your example, you'd add a new Proxy Host for example.com and set some host and port (they don't actually matter since your rewriting the / location). After that, go to the Custom Location tab, set / as path, select http as protocol and redirect it to example.intern/folder on port 80.

As you pointed out, you can also set your location using the advanced config (your right, you'd have to use the first sample), but in your case you should remove the line add_header Content-Type text/plain;, since this was specific to the other question

<!-- gh-comment-id:833879420 --> @p-fruck commented on GitHub (May 6, 2021): Well, kind of. You are referring to the current last post within the issue. But what I meant is the specific answer in the issue that I have linked to. Basically, if you adapt the answer to your example, you'd add a new Proxy Host for `example.com` and set some host and port (they don't actually matter since your rewriting the `/` location). After that, go to the `Custom Location` tab, set `/` as path, select `http` as protocol and redirect it to `example.intern/folder` on port 80. As you pointed out, you can also set your location using the advanced config (your right, you'd have to use the first sample), but in your case you should remove the line `add_header Content-Type text/plain;`, since this was specific to the other question
Author
Owner

@gent99 commented on GitHub (May 7, 2021):

actually i'll have to do this

https://www.oracle-and-apex.com/the-oracle-apex-reverse-proxy-guide-using-nginx/

Kind regards

<!-- gh-comment-id:834325319 --> @gent99 commented on GitHub (May 7, 2021): actually i'll have to do this https://www.oracle-and-apex.com/the-oracle-apex-reverse-proxy-guide-using-nginx/ Kind regards
Author
Owner

@github-actions[bot] commented on GitHub (Mar 12, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1989768064 --> @github-actions[bot] commented on GitHub (Mar 12, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Apr 24, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2825985689 --> @github-actions[bot] commented on GitHub (Apr 24, 2025): Issue was closed due to inactivity.
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#890
No description provided.