Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nginx config to the repo #22

Open
eric-wieser opened this issue Dec 1, 2017 · 0 comments
Open

Add nginx config to the repo #22

eric-wieser opened this issue Dec 1, 2017 · 0 comments

Comments

@eric-wieser
Copy link
Owner

eric-wieser commented Dec 1, 2017

Until then, I'll put it here:

server {
    listen unix:/societies/gcsu/public_html/room-picks/.apache.sock;
    server_name roompicks.caiusjcr.co.uk;

    client_max_body_size 100M;

    location / {
        try_files /dev/null @backend;
    }

    location @backend {
        proxy_pass http://unix:/home/efw27/projects/room-picks/nginx.sock;
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location /static/ {
        root /home/efw27/projects/room-picks;
    }
    location /photos/ {
        root /home/efw27/projects/room-picks/uploaded_files;
        try_files $uri.jpg $uri.png $uri.gif @backend;
        expires 1y;
        access_log off;
        add_header Cache-Control "public";
    }
}

Not necessary, but makes it perform better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant