Hi everyone,
I would like to run a second instance for my development, since the instance for production MUST be ok whatever I try on the other one. Plus, the new instance has a postgres db, and the old one has a mysql db.
To do so I guess that I need to configure nginx properly. For the first instance nginx was configured (by someone else) more or less as described here : https://wiki.galaxyproject.org/Admin/Config/nginxProxy
http { # ... other http stuff ... upstream galaxy_app { server localhost:4242; server { # Galaxy redirection client_max_body_size 10G; 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; } #PHP redirection location ~ \.php$ { root /usr/share/nginx/www; try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # With php5-cgi alone: #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; }
I tried several things to add my second instance, but nothing worked so far. For example i try to add this parts :
upstream galaxy2_app { server localhost:4343; } server { # Galaxy redirection client_max_body_size 10G; location /galaxy2 { proxy_pass http://galaxy2_app; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # here i tried with, and without the 2 previous lines } #PHP redirection location ~ \.php$ { root /usr/share/nginx/www; try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; }
But obviously that could not be that simple. I guess my problem is about those 2 variables "X-Forwarded-Host" and "X-Forwarded-For" because I can't figure their meaning.
Can you help me to find which modification are needed to have 2 disctincts instance regulated by Nginx only?
Thank you,
Christ