hi,

In installed galaxy locally on debian. I'm using nginx as webserver.

However now and then I get a 502 bad gateway. refreshen fix it immediatly, but it doesn't really make it practically...

This is the nginx.conf file I'm now using.

Any help, tips, or suggestions are really welcome!


best regards,

pieter


-----------------------------------------------------------------------------------

user www-data;
worker_processes 4;
pid /run/nginx.pid;

events {
    worker_connections 768;
    # multi_accept on;
}

http {
    # https://www.datadoghq.com/blog/nginx-502-bad-gateway-errors-php-fpm/
    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
   



    ##
    # 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;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;
    #gzip_disable "msie6";

    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 4;
    gzip_disable "MSIE [1-6].(?!.*SV1)";
    gzip_buffers 16 8k;
    gzip_types text/plain text/css application/x-javascript text/xml application/xml text/javascript application/json application/javascript;
    gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    #include /etc/nginx/sites-enabled/*;
   
    ##
    # Galaxy
    ##

    upstream galaxy_app {
        server localhost:8080;
    }
   
    proxy_next_upstream off;
       
    server {
            client_max_body_size 10G;
            # ... other server stuff ...
            location / {
                    proxy_pass   http://galaxy_app;
                    proxy_set_header   X-Forwarded-Host $host;
                    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
            }   

            location /static {
                    alias /home/galaxy/Software/galaxy/static;
            expires 24h;

            }

            location /static/style {
                    alias /home/galaxy/Software/galaxy/static/style/blue;
            expires 24h;
            }

            location /static/scripts {
                    alias /home/galaxy/Software/galaxy/static/scripts;
            }

            location /favicon.ico {
                    alias /home/galaxy/Software/galaxy/static/favicon.ico;
            }

            location /robots.txt {
                    alias /home/galaxy/Software/galaxy/static/robots.txt;
            }

            # serve static content for visualization and interactive environment plugins
            location ~ ^/plugins/(?<plug_type>.+?)/(?<vis_name>.+?)/static/(?<static_file>.*?)$ {
                    alias /home/galaxy/Software/galaxy/config/plugins/$plug_type/$vis_name/static/$static_file;
            }

        location /_x_accel_redirect/ {
            internal;
            alias /;
        }
    }
}

---------------------------------------------------------