These are chat archives for allegro/ralph

18th
Oct 2017
swb
@spencewb16_twitter
Oct 18 2017 20:35
hi - i'm trying to get gunicorn/nginx setup working with my Ralph machine, does anyone have experience with this?
I've used the basic installation method - https://ralph-ng.readthedocs.io/en/latest/installation/installation/
i keep getting a Server Error (500) error when trying to access, which isn't very helpful
my gunicorn.conf file:
description "Gunicorn application server handling Ralph"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
setuid root
setgid root
chdir /opt/ralph/

exec /opt/ralph/ralph-core/bin/gunicorn --workers 3 --bind unix:/opt/ralph/ralph-core/ralph.sock ralph.wsgi:application
swb
@spencewb16_twitter
Oct 18 2017 20:43
my nginx sites-available (and -enabled, which is linked):
server {
    listen 80;
    server_name ralph.domain.com;
    access_log   /var/log/nginx/access.log;
    error_log    /var/log/nginx/error.log;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /opt/ralph/;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/opt/ralph/ralph-core/ralph.sock;
    }

}
both gunicorn and nginx start fine, but get the Server Error (500) error, with nothing showing up in nginx or gunicorn logs...
if i run gunicorn --bind 0.0.0.0:80 ralph.wsgi:application gunicorn works just fine (static files are missing obviously so it looks weird in-browser but that's expected i'm pretty sure)
... so i'm fairly certain i have an nginx configuration issue, anyone able to see why based on above information?
eventually i want this to be configured for https only, but for now i'm struggling just to get basic http configured
swb
@spencewb16_twitter
Oct 18 2017 21:02