[GH-ISSUE #671] Is it possible to point domain to directory ? #565

Closed
opened 2026-02-26 06:33:25 +03:00 by kerem · 4 comments
Owner

Originally created by @lucius100 on GitHub (Oct 21, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/671

Hi, I still don't know very well about nginx proxy manager.
I can setup everything, and works fine.
I just want to know does nginx proxy manager work like nginx/apache2 ?
Because I want to point my domain to the live directory, is it possible ?
Or it's just for proxying the port ?

Originally created by @lucius100 on GitHub (Oct 21, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/671 Hi, I still don't know very well about nginx proxy manager. I can setup everything, and works fine. I just want to know does nginx proxy manager work like nginx/apache2 ? Because I want to point my domain to the live directory, is it possible ? Or it's just for proxying the port ?
kerem 2026-02-26 06:33:25 +03:00
Author
Owner

@spoolr commented on GitHub (Oct 28, 2020):

Like "mydomain.com" -> "192.168.0.1:81/live" ?

Yes, it can forward to a subfolder, but it was tricky many months ago when I originally tried it, probably still is. You have to set up the first tab in the proxy, then duplicate the info in the second tab of the proxy (which is confusing...) and then you have to make sure you have a back slash on the directory (which is also confusing...) It's possible the process has been improved upon, but I doubt it. Expect a lot of "this should work but it doesn't" moments with NPM.

<!-- gh-comment-id:717682739 --> @spoolr commented on GitHub (Oct 28, 2020): Like "mydomain.com" -> "192.168.0.1:81/live" ? Yes, it can forward to a subfolder, but it was tricky many months ago when I originally tried it, probably still is. You have to set up the first tab in the proxy, then duplicate the info in the second tab of the proxy (which is confusing...) and then you have to make sure you have a back slash on the directory (which is also confusing...) It's possible the process has been improved upon, but I doubt it. Expect a lot of "this should work but it doesn't" moments with NPM.
Author
Owner

@redtripleAAA commented on GitHub (Nov 3, 2020):

Yes, you can.

For example, in MS Exchange, you have different webpages to manage, ECP, OWA and etc.

If you wish to setup a subdomain to access directly a directory/page in the URL.

You may setup the subdomain first

http://ecp.example.com

and then go to "Edit Proxy Host" >> "Advanced" >> and add the following line

location = /{return 301 $scheme://$http_host/ecp;}

image

That should takes directly to:

host.com/ecp

I hope that helps

<!-- gh-comment-id:721198949 --> @redtripleAAA commented on GitHub (Nov 3, 2020): Yes, you can. For example, in MS Exchange, you have different webpages to manage, ECP, OWA and etc. If you wish to setup a subdomain to access directly a directory/page in the URL. You may setup the subdomain first http://ecp.example.com and then go to "Edit Proxy Host" >> "Advanced" >> and add the following line > location = /{return 301 $scheme://$http_host/ecp;} ![image](https://user-images.githubusercontent.com/5244872/98005565-2d3f1500-1dbf-11eb-891d-1c6040eac46c.png) That should takes directly to: host.com/ecp I hope that helps
Author
Owner

@Strizz02 commented on GitHub (Nov 21, 2020):

Sorry, but for me it does‘t work. I have the impression that the inserted line leads to a request like

http://sub.mydomain/sub

instead of

http://myip/sub

At any case it doesn‘t help. Still looking for solution.

<!-- gh-comment-id:731594714 --> @Strizz02 commented on GitHub (Nov 21, 2020): Sorry, but for me it does‘t work. I have the impression that the inserted line leads to a request like http://sub.mydomain/sub instead of http://myip/sub At any case it doesn‘t help. Still looking for solution.
Author
Owner

@chaptergy commented on GitHub (May 12, 2021):

See https://github.com/jc21/nginx-proxy-manager/issues/104#issuecomment-490720849

<!-- gh-comment-id:840056074 --> @chaptergy commented on GitHub (May 12, 2021): See https://github.com/jc21/nginx-proxy-manager/issues/104#issuecomment-490720849
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#565
No description provided.