Re: [galaxy-dev] Nginx Config

2014-12-01 Thread Dannon Baker
And can you verify that the galaxy server is actually currently running and
using those ports (from the box, something like 'curl http://127.0.0.1:8080'
)?

On Mon, Dec 1, 2014 at 5:42 AM, Peter van Heusden  wrote:

> Wow that's a lot of upstreams... what is your Galaxy configuration?
>
> On 26 November 2014 at 20:26, Nicholas Kline  wrote:
>
>> Hi,
>>
>> I am trying to setup a local production Galaxy running on Ubuntu,
>> Nginx, PostgreSQL, and ProFTD.
>>
>> When visiting http://localhost, "502 Bad Gateway" is returned.
>> Visiting https://localhost returns "unable to connect". I was
>> expecting to see the Galaxy website instead.
>>
>> My Nginx configuration file is included below. Thank you for your help.
>>
>>
>>
>> ###
>> # /etc/nginx/nginx.conf
>> ###
>>
>> user www-data;
>> worker_processes 4;
>> pid /run/nginx.pid;
>>
>> events {
>> worker_connections 768;
>> # multi_accept on;
>> }
>>
>> http {
>>
>> ##
>> # Basic Settings
>> ##
>>
>> sendfile on;
>> tcp_nopush on;
>> tcp_nodelay on;
>> keepalive_timeout 65;
>> types_hash_max_size 2048;
>> # server_tokens off;
>>
>> # server_names_hash_bucket_size 64;
>> # server_name_in_redirect off;
>>
>> include /etc/nginx/mime.types;
>> default_type application/octet-stream;
>>
>> ##
>> # Logging Settings
>> ##
>>
>> access_log /var/log/nginx/access.log;
>> error_log /var/log/nginx/error.log;
>>
>> ##
>> # Gzip Settings
>> ##
>>
>> gzip on;
>> gzip_http_version 1.1;
>> gzip_vary on;
>> gzip_comp_level 4;
>> gzip_proxied any;
>> gzip_types text/plain text/css application/x-javascript text/xml
>> application/xml text/javascript application/json;
>> gzip_buffers 16 8k;
>> gzip_disable "MSIE [1-6].(?!.*SV1)";
>>
>> ##
>> # nginx-naxsi config
>> ##
>> # Uncomment it if you installed nginx-naxsi
>> ##
>>
>> #include /etc/nginx/naxsi_core.rules;
>>
>> ##
>> # nginx-passenger config
>> ##
>> # Uncomment it if you installed nginx-passenger
>> ##
>>
>> #passenger_root /usr;
>> #passenger_ruby /usr/bin/ruby;
>>
>> ##
>> # Virtual Host Configs
>> ##
>>
>> include /etc/nginx/conf.d/*.conf;
>> #include /etc/nginx/sites-enabled/*;
>>
>> ##
>> # Galaxy
>> ##
>>
>> upstream galaxy_app {
>> # As defined in galaxy config file universe_wsgi.ini
>> server localhost:8080;
>> server localhost:8081;
>> server localhost:8082;
>> server localhost:8083;
>> server localhost:8084;
>> server localhost:8085;
>> server localhost:8086;
>> server localhost:8087;
>> server localhost:8088;
>> server localhost:8089;
>> }
>>
>> server {
>> # Maximum upload size that can be handled by POST requests
>> through nginx.
>> # Disabled because using FTP instead of web interface.
>> #client_max_body_size 10G;
>>
>> location / {
>> proxy_pass   http://galaxy_app;
>> proxy_set_header   X-Forwarded-Host $host;
>> proxy_set_header   X-Forwarded-For
>> $proxy_add_x_forwarded_for;
>> # If using SSL, makes Galaxy aware of what type of URL it
>> should generate for external sites like Biomart.
>> proxy_set_header   X-URL-SCHEME https;
>> }
>>
>> # nginx is more efficient at serving static content.
>> # expires 24h is for caching purposes.
>> location /static {
>> alias /home/galaxy/galaxy-dist/static;
>> expires 24h;
>> }
>> location /static/style {
>> alias /home/galaxy/galaxy-dist/static/june_2007_style/blue;
>> expires 24h;
>> }
>> location /static/scripts {
>> alias /home/galaxy/galaxy-dist/static/scripts/packed;
>> }
>> location /favicon.ico {
>> alias /home/galaxy/galaxy-dist/static/favicon.ico;
>> }
>> location /robots.txt {
>> alias /home/galaxy/galaxy-dist/static/robots.txt;
>> }
>>
>> # Use nginx to send files (downloads) instead of Galaxy.
>> location /_x_accel_redirect/ {
>> internal;
>> alias /;
>> }
>> }
>> }
>>
>>
>>
>> ###
>> # /var/log/nginx/error.log
>> ###
>>
>> 2014/11/25 15:43:21 [error] 56433#0: *23 connect() failed (111:
>> Connection refused) while connecting to upstream, client: 127.0.0.1,
>> server: , request: "GET / HTTP/1.1", upstream:
>> "http://127.0.0.1:8089/";, host: "localhost"
>> 2014/11/25 15:43:21 [error] 56433#0: *23 connect() failed (111:
>> Connection refused) while connecting to upstream, client: 127.0.0.1,
>> server: , request: "GET / HTTP/1.1", upstream:
>> "http://127.0.0.1:8080/";, host: "localhost"
>> 2014/11/25 15:43:21 [error] 56433#0: *23 conne

Re: [galaxy-dev] Nginx Config

2014-12-01 Thread Peter van Heusden
Wow that's a lot of upstreams... what is your Galaxy configuration?

On 26 November 2014 at 20:26, Nicholas Kline  wrote:

> Hi,
>
> I am trying to setup a local production Galaxy running on Ubuntu,
> Nginx, PostgreSQL, and ProFTD.
>
> When visiting http://localhost, "502 Bad Gateway" is returned.
> Visiting https://localhost returns "unable to connect". I was
> expecting to see the Galaxy website instead.
>
> My Nginx configuration file is included below. Thank you for your help.
>
>
>
> ###
> # /etc/nginx/nginx.conf
> ###
>
> user www-data;
> worker_processes 4;
> pid /run/nginx.pid;
>
> events {
> worker_connections 768;
> # multi_accept on;
> }
>
> http {
>
> ##
> # Basic Settings
> ##
>
> sendfile on;
> tcp_nopush on;
> tcp_nodelay on;
> keepalive_timeout 65;
> types_hash_max_size 2048;
> # server_tokens off;
>
> # server_names_hash_bucket_size 64;
> # server_name_in_redirect off;
>
> include /etc/nginx/mime.types;
> default_type application/octet-stream;
>
> ##
> # Logging Settings
> ##
>
> access_log /var/log/nginx/access.log;
> error_log /var/log/nginx/error.log;
>
> ##
> # Gzip Settings
> ##
>
> gzip on;
> gzip_http_version 1.1;
> gzip_vary on;
> gzip_comp_level 4;
> gzip_proxied any;
> gzip_types text/plain text/css application/x-javascript text/xml
> application/xml text/javascript application/json;
> gzip_buffers 16 8k;
> gzip_disable "MSIE [1-6].(?!.*SV1)";
>
> ##
> # nginx-naxsi config
> ##
> # Uncomment it if you installed nginx-naxsi
> ##
>
> #include /etc/nginx/naxsi_core.rules;
>
> ##
> # nginx-passenger config
> ##
> # Uncomment it if you installed nginx-passenger
> ##
>
> #passenger_root /usr;
> #passenger_ruby /usr/bin/ruby;
>
> ##
> # Virtual Host Configs
> ##
>
> include /etc/nginx/conf.d/*.conf;
> #include /etc/nginx/sites-enabled/*;
>
> ##
> # Galaxy
> ##
>
> upstream galaxy_app {
> # As defined in galaxy config file universe_wsgi.ini
> server localhost:8080;
> server localhost:8081;
> server localhost:8082;
> server localhost:8083;
> server localhost:8084;
> server localhost:8085;
> server localhost:8086;
> server localhost:8087;
> server localhost:8088;
> server localhost:8089;
> }
>
> server {
> # Maximum upload size that can be handled by POST requests
> through nginx.
> # Disabled because using FTP instead of web interface.
> #client_max_body_size 10G;
>
> location / {
> proxy_pass   http://galaxy_app;
> proxy_set_header   X-Forwarded-Host $host;
> proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
> # If using SSL, makes Galaxy aware of what type of URL it
> should generate for external sites like Biomart.
> proxy_set_header   X-URL-SCHEME https;
> }
>
> # nginx is more efficient at serving static content.
> # expires 24h is for caching purposes.
> location /static {
> alias /home/galaxy/galaxy-dist/static;
> expires 24h;
> }
> location /static/style {
> alias /home/galaxy/galaxy-dist/static/june_2007_style/blue;
> expires 24h;
> }
> location /static/scripts {
> alias /home/galaxy/galaxy-dist/static/scripts/packed;
> }
> location /favicon.ico {
> alias /home/galaxy/galaxy-dist/static/favicon.ico;
> }
> location /robots.txt {
> alias /home/galaxy/galaxy-dist/static/robots.txt;
> }
>
> # Use nginx to send files (downloads) instead of Galaxy.
> location /_x_accel_redirect/ {
> internal;
> alias /;
> }
> }
> }
>
>
>
> ###
> # /var/log/nginx/error.log
> ###
>
> 2014/11/25 15:43:21 [error] 56433#0: *23 connect() failed (111:
> Connection refused) while connecting to upstream, client: 127.0.0.1,
> server: , request: "GET / HTTP/1.1", upstream:
> "http://127.0.0.1:8089/";, host: "localhost"
> 2014/11/25 15:43:21 [error] 56433#0: *23 connect() failed (111:
> Connection refused) while connecting to upstream, client: 127.0.0.1,
> server: , request: "GET / HTTP/1.1", upstream:
> "http://127.0.0.1:8080/";, host: "localhost"
> 2014/11/25 15:43:21 [error] 56433#0: *23 connect() failed (111:
> Connection refused) while connecting to upstream, client: 127.0.0.1,
> server: , request: "GET / HTTP/1.1", upstream:
> "http://127.0.0.1:8081/";, host: "localhost"
> 2014/11/25 15:43:21 [error] 56433#0: *23 connect() failed (111:
> Connection refused) while connecting to upstream, client: 127.0.0.1,
> server: , request: "GET / HTTP/1.1", upstream:
> "http://127.0.0.1