nginx Proxy to VM problem
Hey everyone, I'm having a weird login problem (think it's cookie related) after setting up Galaxy on a virtual machine and trying to proxy_pass to it using nginx. It says I'm logged in, but when I get redirected to the front page I'm no longer logged in. When I visit subsequent pages I'm also not logged in. On the server, here is the relevant part of my nginx configuration (I'm going to setup static serving after I get the login issue resolved): upstream galaxy_app { server 192.168.1.11:8080; } server { ... location /galaxy { proxy_pass http://galaxy_app; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } ... } The dots just mean that I have other things in there for the forwarding I do with other VMs. On the VM, in my universe_wsgi.ini file, I have made sure to set the following (just showing the parts I think are relevant): [server:main] port = 8080 host = 0.0.0.0 [filter:proxy-prefix] use = egg:PasteDeploy#prefix prefix = /galaxy [app:main] filter-with = proxy-prefix cookie_path = /galaxy I should note that I might end up changing this configuration to use a CNAME at some point (thus avoiding the prefix issue), but for now I'm totally lost as to why I'm not able to login using my current configuration. Any ideas? Thanks! Sincerely, Michael E. Cotterell Ph.D. Student in Computer Science, University of Georgia Instructor of Record, Graduate RA & TA, University of Georgia mepcotterell@gmail.com (mailto:mepcotterell@gmail.com) mepcott@uga.edu (mailto:mepcott@uga.edu) mec@cs.uga.edu (mailto:mec@cs.uga.edu) http://michaelcotterell.com/
I actually fixed the problem by not setting the cookie prefix in the ini file. Weird. Sincerely, Michael E. Cotterell Ph.D. Student in Computer Science, University of Georgia Instructor of Record, Graduate RA & TA, University of Georgia mepcotterell@gmail.com (mailto:mepcotterell@gmail.com) mepcott@uga.edu (mailto:mepcott@uga.edu) mec@cs.uga.edu (mailto:mec@cs.uga.edu) http://michaelcotterell.com/ On Wednesday, May 22, 2013 at 9:51 AM, Michael E. Cotterell wrote:
Hey everyone,
I'm having a weird login problem (think it's cookie related) after setting up Galaxy on a virtual machine and trying to proxy_pass to it using nginx. It says I'm logged in, but when I get redirected to the front page I'm no longer logged in. When I visit subsequent pages I'm also not logged in.
On the server, here is the relevant part of my nginx configuration (I'm going to setup static serving after I get the login issue resolved):
upstream galaxy_app { server 192.168.1.11:8080; }
server { ... location /galaxy { proxy_pass http://galaxy_app; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
... }
The dots just mean that I have other things in there for the forwarding I do with other VMs.
On the VM, in my universe_wsgi.ini file, I have made sure to set the following (just showing the parts I think are relevant):
[server:main] port = 8080 host = 0.0.0.0
[filter:proxy-prefix] use = egg:PasteDeploy#prefix prefix = /galaxy
[app:main] filter-with = proxy-prefix cookie_path = /galaxy
I should note that I might end up changing this configuration to use a CNAME at some point (thus avoiding the prefix issue), but for now I'm totally lost as to why I'm not able to login using my current configuration.
Any ideas?
Thanks!
Sincerely, Michael E. Cotterell
Ph.D. Student in Computer Science, University of Georgia Instructor of Record, Graduate RA & TA, University of Georgia mepcotterell@gmail.com (mailto:mepcotterell@gmail.com) mepcott@uga.edu (mailto:mepcott@uga.edu) mec@cs.uga.edu (mailto:mec@cs.uga.edu) http://michaelcotterell.com/
That's not the only thing I changed. I also have the following in my nginx conf file: proxy_set_header Host $host; instead of X-Forwarded-Host $host Sincerely, Michael E. Cotterell Ph.D. Student in Computer Science, University of Georgia Instructor of Record, Graduate RA & TA, University of Georgia mepcotterell@gmail.com (mailto:mepcotterell@gmail.com) mepcott@uga.edu (mailto:mepcott@uga.edu) mec@cs.uga.edu (mailto:mec@cs.uga.edu) http://michaelcotterell.com/ On Wednesday, May 22, 2013 at 11:11 AM, Michael E. Cotterell wrote:
I actually fixed the problem by not setting the cookie prefix in the ini file. Weird.
Sincerely, Michael E. Cotterell
Ph.D. Student in Computer Science, University of Georgia Instructor of Record, Graduate RA & TA, University of Georgia mepcotterell@gmail.com (mailto:mepcotterell@gmail.com) mepcott@uga.edu (mailto:mepcott@uga.edu) mec@cs.uga.edu (mailto:mec@cs.uga.edu) http://michaelcotterell.com/
On Wednesday, May 22, 2013 at 9:51 AM, Michael E. Cotterell wrote:
Hey everyone,
I'm having a weird login problem (think it's cookie related) after setting up Galaxy on a virtual machine and trying to proxy_pass to it using nginx. It says I'm logged in, but when I get redirected to the front page I'm no longer logged in. When I visit subsequent pages I'm also not logged in.
On the server, here is the relevant part of my nginx configuration (I'm going to setup static serving after I get the login issue resolved):
upstream galaxy_app { server 192.168.1.11:8080; }
server { ... location /galaxy { proxy_pass http://galaxy_app; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
... }
The dots just mean that I have other things in there for the forwarding I do with other VMs.
On the VM, in my universe_wsgi.ini file, I have made sure to set the following (just showing the parts I think are relevant):
[server:main] port = 8080 host = 0.0.0.0
[filter:proxy-prefix] use = egg:PasteDeploy#prefix prefix = /galaxy
[app:main] filter-with = proxy-prefix cookie_path = /galaxy
I should note that I might end up changing this configuration to use a CNAME at some point (thus avoiding the prefix issue), but for now I'm totally lost as to why I'm not able to login using my current configuration.
Any ideas?
Thanks!
Sincerely, Michael E. Cotterell
Ph.D. Student in Computer Science, University of Georgia Instructor of Record, Graduate RA & TA, University of Georgia mepcotterell@gmail.com (mailto:mepcotterell@gmail.com) mepcott@uga.edu (mailto:mepcott@uga.edu) mec@cs.uga.edu (mailto:mec@cs.uga.edu) http://michaelcotterell.com/
participants (1)
-
Michael E. Cotterell