Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing in Nginx conf. #1039

Closed
Notaduck opened this issue Apr 15, 2017 · 4 comments
Closed

Trailing in Nginx conf. #1039

Notaduck opened this issue Apr 15, 2017 · 4 comments
Labels
Type: Documentation Lack of documentation, improvement suggestion, or PRs that address these. Type: Question Support cases rather than issues. Should be asked on the Freenode channel or Stack Overflow.

Comments

@Notaduck
Copy link

The trailing in the Nginx configuration should be removed, in order to make it function

location /irc/ {
	proxy_pass http://localhost:9000/;
	proxy_http_version 1.1;
	proxy_set_header Connection "upgrade";
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header X-Forwarded-For $remote_addr;

	# by default nginx times out connections in one minute
	proxy_read_timeout 1d;
}

I had to edit it to this, to make it work

location / {
	proxy_pass http://localhost:9000/;
	proxy_http_version 1.1;
	proxy_set_header Connection "upgrade";
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header X-Forwarded-For $remote_addr;

	# by default nginx times out connections in one minute
	proxy_read_timeout 1d;
}
@dgw
Copy link
Contributor

dgw commented Apr 15, 2017

s/trailing/directory path/

The Lounge is supposed to support being proxied behind a /path/ URL, so it seems #27 was subsequently broken?

@xPaw
Copy link
Member

xPaw commented Apr 15, 2017

What was the problem you were experiencing? Does adding

rewrite ^/irc/(.*) /$1 break;

fix the issue?

@Notaduck
Copy link
Author

Notaduck commented Apr 17, 2017

@xPaw I was getting a 502 and it was impossible to reach the server with a domain. I used this config to fix it

server {

     server_name lounge.xxxxxxx.eu;
     return 301 https://lounge.xxxxxxx.eu$request_uri;
     
     location / {
     	proxy_pass http://10.0.2.11:9000/;
     	proxy_http_version 1.1;
     	proxy_set_header Connection "upgrade";
     	proxy_set_header Upgrade $http_upgrade;
     	proxy_set_header X-Forwarded-For $remote_addr;

     	# by default nginx times out connections in one minute
     	proxy_read_timeout 1d;
     }

@xPaw I will try you soultion as well to see if it works and then report back, but for now everything is working

@AlMcKinlay
Copy link
Member

@Notaduck any update on this?

Feel free to edit the wiki if you think it needs to change. Closing this just now.

@astorije astorije added Type: Documentation Lack of documentation, improvement suggestion, or PRs that address these. Type: Question Support cases rather than issues. Should be asked on the Freenode channel or Stack Overflow. labels Jun 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Lack of documentation, improvement suggestion, or PRs that address these. Type: Question Support cases rather than issues. Should be asked on the Freenode channel or Stack Overflow.
Projects
None yet
Development

No branches or pull requests

5 participants