nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

How do i forward to a folder?

Open danmed opened this issue 7 years ago • 117 comments

I'd like to have something like

https://sub.domain.com forward to https://192.168.1.1:8080/sub

is that currently possible? I can't find a way to achieve it.. I've tried searching issues but i think i'm missing some fundamental vocabulary to find my answer..

danmed avatar Mar 15 '19 11:03 danmed

I guess it depends on the upstream service. What is "sub"? Does https://192.168.1.1:8080/ redirect to sub alone? If so, just forward to / and let it do it's thing.

FWIW this project isn't trying to solve these types of problems. It's just trying to expose upstream services, not redirect their paths.

jc21 avatar Mar 18 '19 01:03 jc21

sub can be anything... so http://jeff.mydomain.com forward to http://192.168.1.1/sonarr

for example..

danmed avatar Mar 18 '19 08:03 danmed

So in that example, http://192.168.1.1/sonarr is another reverse proxy for http://192.168.1.1:8989 so why not just create http://sonarr.mydomain.com -> http://192.168.1.1:8989

jc21 avatar Mar 18 '19 22:03 jc21

I dont think i'm explaining myself very well..

Say for example i have a system that hosts many things... each of them available in different sub folders..

http://192.168.1.1/sonarr http://192.168.1.1/randomsite http://192.168.1.1/cameras

now i'd like, in nginx proxy manager to set up a subdomain for each one of those.

http://sonarr.domain.com http://randomsite.domain.com http://cameras.domain.com

i currently can't do this, yet it can be done in the config files that i used to use...

Now, if i'm being a dumbass here, it's because of a lack of vocabulary to fully explain myself..

danmed avatar Mar 19 '19 08:03 danmed

http://192.168.1.1/sonarr what does this mean? Do you already have a running web server that serves the sonar at that URL?

By the way, are you sure this project is that tool what you need? To serve sonar, camera platform or any other things just set a standalone NGINX up.

kolbii avatar Mar 19 '19 18:03 kolbii

Sonarr is installed on another server, a Windows one.. that is the URL that it serves it's interface on.. it's already available... I want it on an external address which is what nginx-proxy-manager does... I can very easily point sonarr.domain.com to 192.168.2.2 on whatever Port.. but not all applications (sonarr is just an example.. it really doesn't matter what it is) only use a port.. they also have a folder as part of the URL.. how do I send sonarr.domain.com to this URL folder...

Your project is exactly what I need.. I've been using NGINX to do this for years.. but I cannot find a way to to do this in the nginx-proxy-manager

There is an example of a working config for NGINX here : https://www.reddit.com/r/nginx/comments/6gbg9i/reverse_proxy_a_subdomain_to_a_folder_reward/dipf0x7/

On Tue, Mar 19, 2019, 6:35 PM kolbii [email protected] wrote:

http://192.168.1.1/sonarr what does this mean? Do you already have a running web server that serves the sonar at that URL?

By the way, are you sure this project is that tool what you need? To serve sonar, camera platform or any other things just set a standalone NGINX up.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jc21/nginx-proxy-manager/issues/104#issuecomment-474516786, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsuWpGLb-MeXqX_iZp_R1vMenMkp8l4ks5vYS4HgaJpZM4b2Qt4 .

danmed avatar Mar 19 '19 19:03 danmed

I think you're explaining yourself ok, but I don't think you're understanding that you are already running a webserver as a reverse proxy on that windows machine that sits in front of your services. Since this project is just that, you don't need both. Whatever is running on port 80 on 192.168.1.1 is what you need to skip over and connect directly to the service.

FWIW the sonarr instructions for windows do in fact listen on port 8989 on the box you're running it on.

Just try it. Create a proxy hist in NPM that points to the machine running Sonarr on port 8989 and see what happens.

jc21 avatar Mar 19 '19 22:03 jc21

Sonarr was just an example.. I know it runs on that Port.. don't worry, I'll figure out a way to do what I'm talking about.. thanks for getting back to me though.

On Tue, Mar 19, 2019, 10:20 PM jc21 [email protected] wrote:

I think you're explaining yourself ok, but I don't think you're understanding that you are already running a webserver as a reverse proxy on that windows machine that sits in front of your services. Since this project is just that, you don't need both. Whatever is running on port 80 on 192.168.1.1 is what you need to skip over and connect directly to the service.

FWIW the sonarr instructions https://sonarr.tv/ for windows do in fact listen on port 8989 on the box you're running it on.

Just try it. Create a proxy hist in NPM that points to the machine running Sonarr on port 8989 and see what happens.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jc21/nginx-proxy-manager/issues/104#issuecomment-474607127, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsuWh1pt7Z9-jLHXczhuxGT-d_7HQYTks5vYWKwgaJpZM4b2Qt4 .

danmed avatar Mar 20 '19 06:03 danmed

Hello, I am having the same problem here. I can serve my "Guacamole" installation out from "192.168.1.10:8080/guacamole" with clasic Nginx. But impossible to join in Nginx Proxy Manager, I have tryed everything, I just get to the "192.168.1.10:8080" wich is the Tomcat root and not the application root.

will you extend this functionallity in the near future?

ursus69 avatar Apr 30 '19 09:04 ursus69

Hopefully you can make the Dev understand the issue.. I wasn't able to articulate the problem I was having even though I can achieve it perfectly in plain old NGINX

On Tue, 30 Apr 2019, 10:39 Jose, [email protected] wrote:

Hello, I am having the same problem here. I can serve my "Guacamole" installation out from " 192.168.1.10:8080/guacamole" with clasic Nginx. But impossible to join in Nginx Proxy Manager, I have tryed everything, I just get to the "192.168.1.10:8080" wich is the Tomcat root and not the application root.

will you extend this functionallity in the near future?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jc21/nginx-proxy-manager/issues/104#issuecomment-487889184, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5S4WU7LIEEIGE47DXXGU3PTAHULANCNFSM4G6ZBN4A .

danmed avatar Apr 30 '19 13:04 danmed

Here is an example that may help clarify things.

I am running PHPMyadmin on a MySQL box..

I have set up a proxy host in Nginx Proxy Manager as so :

image

The problem is, that to actually access Phpmyadmin, i have to visit

https://sub.domain.co.uk/phpmyadmin

i want to be able to access it by JUST visiting

https://sub.domain.co.uk

danmed avatar May 03 '19 08:05 danmed

I was able to accomplish your situation with the existing interface. However there is a problem that I'll have to solve before it will work for everyone. Stay tuned.

jc21 avatar May 08 '19 00:05 jc21

That's awesome, thank you so much. Look forward to hearing from you

On Wed, 8 May 2019, 01:39 jc21, [email protected] wrote:

I was able to accomplish your situation with the existing interface. However there is a problem that I'll have to solve before it will work for everyone. Stay tuned.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jc21/nginx-proxy-manager/issues/104#issuecomment-490303874, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5S4WSHKRLQSUEU6RH5OJLPUIOKRANCNFSM4G6ZBN4A .

danmed avatar May 08 '19 04:05 danmed

I notice you've pushed a fix.. how would i go about getting hold of that fix?

danmed avatar May 08 '19 09:05 danmed

I'm in the middle of testing it along with a few other fixes. Should be releasing within a day

jc21 avatar May 08 '19 22:05 jc21

v2.0.13 is up with the fix. Here's how you would setup:

http://example.com -> http://192.168.0.10/phpmyadmin/
  1. Create a proxy host
  2. On the details tab, enter any ip address and port, it's required for the form but it won't actually be used, so it can be anything
  3. On the Custom Locations tab, create a location with / as the location path and for the Forward Hostname / IP enter 192.168.0.10/phpmyadmin/ making sure you have that trailing slash, it's important.
  4. Save, and test.

jc21 avatar May 09 '19 02:05 jc21

Hello, could you put your changes in the latest-armhf so I can test them, is the one that I use in a RasPi, and I just pulled the latest is from:

jc21/nginx-proxy-manager:latest-armhf 522.3 MB 2019-03-05 05:56:03

Many Thanks On Thu, May 9, 2019 at 4:37 AM jc21 [email protected] wrote:

v2.0.13 is up with the fix. Here's how you would setup:

http://example.com -> http://192.168.0.10/phpmyadmin/

  1. Create a proxy host
  2. On the details tab, enter any ip address and port, it's required for the form but it won't actually be used, so it can be anything
  3. On the Custom Locations tab, create a location with / as the location path and for the Forward Hostname / IP enter 192.168.0.10/phpmyadmin/ making sure you have that trailing slash, it's important.
  4. Save, and test.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jc21/nginx-proxy-manager/issues/104#issuecomment-490720849, or mute the thread https://github.com/notifications/unsubscribe-auth/ABFXWB4NWDPMV3B3TIZ5NM3PUOE7VANCNFSM4G6ZBN4A .

ursus69 avatar May 09 '19 15:05 ursus69

The latest-armhf tag is deprecated. You should be able to use the latest tag and because of docker manifests, you'll get the image applicable for your Pi, which is probably going to be latest-armv7l

jc21 avatar May 09 '19 22:05 jc21

Thanks for this.. works great (As long as you read the instructions and add the trailing / ) :)

thanks again

danmed avatar May 10 '19 07:05 danmed

Great Work!

Exactly what I needed !

Sent from my iPhone

On 10 May 2019, at 09:55, danmed [email protected] wrote:

Thanks for this.. works great (As long as you read the instructions and add the trailing / ) :)

thanks again

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ursus69 avatar May 10 '19 08:05 ursus69