Closed jneljeff closed 6 years ago
Try adding a slash after the port. If that doesn’t work I can post my proxy config as an example:
proxy_pass http://ip:port/;
No dice. Everything works locally, but not through https://contoso.com/nowshowing using the following config:
location /nowshowing/ { proxy_pass http://172.18.0.1:6878/; add_header X-Frame-Options "SAMEORIGIN"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
So I just tested using only your proxy settings and it worked fine for me. Are you sure your ip/port is correct? 6878 is the internal docker port, did you maybe map to a different port when you started the docker? maybe you have some other global setting outside that server block that is effecting it? did a sudo service nginx reload after your added semi-colon change?
I used:
location /nowshowingtest/ {
proxy_pass http://192.168.1.18:6878/;
add_header X-Frame-Options "SAMEORIGIN";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
I will triple check when I get home but I tried both the docker gateway just like my other containers as well as copy and pasted the accessable server ip:port from my browser. If the base directory doesn't matter I'm a bit at a loss.
Sent from BlueMail
On Feb 22, 2018, 2:56 PM, at 2:56 PM, ninthwalker notifications@github.com wrote:
So I just tested using only your proxy settings and it worked fine for me. Are you sure your ip/port is correct? 6878 is the internal docker port, did you maybe map to a different port when you started the docker? maybe you have some other global setting outside that server block that is effecting it?
I used:
location /poop/ { proxy_pass http://192.168.1.18:6878/; add_header X-Frame-Options "SAMEORIGIN"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/ninthwalker/NowShowing/issues/54#issuecomment-367819391
Truly the only variable I can see is having the /nowshowing base URL... if it works for you as it I'm not sure what I'm doing wrong with your container...
I'm not sure what else then. =/ A lot of people use it through an nginx reverse proxy and it's working for them without a base url needed.
I've triple checked all my ports and ip addresses... I even opened up the port on my firewall just to be sure... I did make a little head-way by changing the docker network adapter to host instead of the bridge network which allows the page to load, but the page is broken because all addresses attempt to resolve outside of the /nowshowing directory (ex. contoso.com/img/logo.png instead of contoso.com/nowshowing/img/logo.png). Can you share your nginx config as an example on how to override this if it's not possible to set it in the application?
So out of pure lack of anything else to try I took the files in the www directory and put them in a /nowshowing subdirectory and everything loads beautifully. I'm still curious how you and others are managing to make it work without these changes, but if it's not something you want to explore go ahead and close the issue.
I spoke too soon. Everything still loads but I realized the pages are still being generated for the root of www meaning I'll have to move the files by hand every time a report is generated... Not ideal.
That is def not worth the trouble. What I’ll do later today is create an entirely seperate config with only the nowshowing and proxy info and then show you that and you can try.
I feel like there is some extra global proxy setting you have or something that may be conflicting.
On Mar 1, 2018, at 06:39, jneljeff notifications@github.com wrote:
I spoke too soon. Everything still loads but I realized the pages are still being generated for the root of www meaning I'll have to move the files by hand every time a report is generated... Not ideal.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
If there is I'm neither aware of it and it doesn't impact any other container. I am running a Google domain pointing directly to my home ip with both port 80 and 443 forwarded to my docker server where nginx reverse proxies to all 17 other services running in docker all of which either run as host or defined ports through one docker bridge. With the exception of the default conf file in nginx everything is running in an out of the box state on the host system.
I look forward to seeing what you've got.
Sent from BlueMail
On Mar 1, 2018, 10:46 AM, at 10:46 AM, ninthwalker notifications@github.com wrote:
That is def not worth the trouble. What I’ll do later today is create an entirely seperate config with only the nowshowing and proxy info and then show you that and you can try.
I feel like there is some extra global proxy setting you have or something that may be conflicting.
On Mar 1, 2018, at 06:39, jneljeff notifications@github.com wrote:
I spoke too soon. Everything still loads but I realized the pages are still being generated for the root of www meaning I'll have to move the files by hand every time a report is generated... Not ideal.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/ninthwalker/NowShowing/issues/54#issuecomment-369654089
Sorry a couple days passed, stuff blew up at work this week and took all my time. So.. I don't know what's making it work for me. I literally can't break mine.
I created a new file just for NowShowing in my sites-enabled. I made sure it wasn't linked to any other proxy.conf and I looked in my main nginx.conf and that has no proxy or includes to other files related.
I took all my other proxy settings out, no other server blocks, just the bare-bones, even took out the webroot, everything out that I could, and it still works for me. I had to leave in SSL, because I have my site set to strict so all the browsers remember it only can use ssl. See below for my full file:
../sites-enabled/nowshowing
# NowShowing Site
server {
listen 443 ssl;
server_name mydomain.com www.mydomain.com;
ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem;
location /nowshowing/ {
proxy_pass http://192.168.1.22:34567/;
}
}
I have no idea what the solution is then... I even changed the port number to make sure there wasn't a conflict somewhere... Oh well. I appreciate your help. The email function is working which is all I really need out of this. Thanks for considering my request, I'll just go without the webpage if you want to close this ticket.
Yea, sorry we couldn't find a solution for you. Maybe it will just start magically working some day =(
i'd like to put this behind a reverse proxy but i dont see anywhere to set a base url.