jlesage / docker-nginx-proxy-manager

Docker container for Nginx Proxy Manager
MIT License
780 stars 176 forks source link

Custom Locations Not Working #37

Open qy2009 opened 5 years ago

qy2009 commented 5 years ago

Hi,

I set up a proxy host, and it is fine with main host xxx.com. however when I tried to add a few "custom locations". such as xxx.com/proxy, or xxx.com/music. all of them not working.

How can I check where I did wrong? some got 502 Bad Gateway , some got 404 Not Found

jlesage commented 5 years ago

You can check log files at log/nginx/proxy_host-*.log, in the directory you mapped to /config.

qy2009 commented 5 years ago

here is the log: if I want to access xxx.com/tv

[10/Oct/2019:21:54:53 +0000] - 404 404 - GET https xxx.com "/tv" [Client 47.176.48.194] [Length 1816] [Gzip -] [Sent-to 10.0.0.10] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0" "-"

then nothing further.

If I visited the main domain. lots of logs are showing up: [10/Oct/2019:21:45:08 +0000] - 200 200 - GET https xxx.com "/portal/apis/activityMonitor/act.cgi?sid=gaCfXUh5fp4t&act=list&_dc=157006303" [Client 47.176.48.194] [Length 453] [Gzip -] [Sent-to 10.0.0.10] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0" "https://xxx.com/portal/?5D9FA7C"

On Thu, Oct 10, 2019 at 7:22 AM Jocelyn Le Sage notifications@github.com wrote:

You can check log files at log/nginx/proxy_host-*.log, in the directory you mapped to /config.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jlesage/docker-nginx-proxy-manager/issues/37?email_source=notifications&email_token=AMJG3MLEJNJK2BWIGY4Y72LQN43B3A5CNFSM4I6XZFKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA4RFFA#issuecomment-540611220, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMJG3MOG64QVVZGC5WD5QB3QN43B3ANCNFSM4I6XZFKA .

r3im3r commented 5 years ago

how can i resend a http to https ? i can not really find out my self

jlesage commented 5 years ago

@qy2009, how did you configured your custom location?

jlesage commented 5 years ago

@r3im3r, the Force SSL option under the SSL tab of the proxy host will automatically redirect HTTP queries to HTTPs.

qy2009 commented 5 years ago

@jlesage

here are a few: location /proxy Scheme https Forward hostname 10.0.0.10 port 81

location /tv scheme http hostname 10.0.0.10 port 31

location /music scheme http hostname 10.0.0.10 port 69

jlesage commented 5 years ago

Are you able to manually access a proxied service ? Like http://10.0.0.10:31 ? Also, are you able to check logs on the service's side to see if it get reached?

qy2009 commented 5 years ago

you mean manually type http://10.0.0.31 on the browser? yes, I can. they are my docker containers...

when I checked the container log, it shows below: [18-Oct-2019 00:58:10] NOTICE: fpm is running, pid 6, [18-Oct-2019 00:58:10] NOTICE: ready to handle connections, 127.0.0.1 - 18/Oct/2019:00:58:31 +0000 "POST /api.php" 200, 127.0.0.1 - 18/Oct/2019:00:58:31 +0000 "POST /api.php" 200, 127.0.0.1 - 18/Oct/2019:00:58:31 +0000 "POST /api.php" 200, 127.0.0.1 - 18/Oct/2019:00:58:31 +0000 "POST /api.php" 200, 127.0.0.1 - 18/Oct/2019:00:58:31 +0000 "POST /api.php" 200, 127.0.0.1 - 18/Oct/2019:00:58:32 +0000 "POST /api.php" 200, 127.0.0.1 - 18/Oct/2019:00:58:32 +0000 "POST /api.php" 200, 127.0.0.1 - 18/Oct/2019:00:58:32 +0000 "POST /api.php" 200,

not sure if that is the log I could be looking for...

qy2009 commented 5 years ago

any updates? @jlesage

jlesage commented 5 years ago

Sorry about the delay. Can you try to add a trailing slash to the hostname ? e.g. 10.0.0.10/.

qy2009 commented 5 years ago

you mean the field "Forward Hostname / IP*" under custom locations, right? I tried, and still same result :(

maxdd commented 3 years ago

I have the same issue, i have multiple dockers accessible locally at different ports and a dyndns domain.

Ideally i would like to have: xyz.com/abc --> http://localip:58695 xyz.com/def --> http://localip:9585

Matt-CyberGuy commented 3 years ago

Same, I have the same issue. I've been trying to get this working for over a year with no luck. I noticed on one of my webservices that auto forwards http://10.0.0.1:81/ -> http://10.0.0.1:81/Main.

When I set my custom location up do to https://myserver.com/service, when I navigated to the address, I was immediately forwarded to https://myserver.com/Main, when it should be https://myserver.com/service/Main

oywino commented 1 year ago

Me too, I have the same issue trying to map my.domain.com --> https://192.168.x.x:8080/guacamole I have found a ton of users with the same problem in many different forums. Why not give a correct explanation (example) on how to get this to work.