Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
Add nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Barfurth committed Jul 19, 2015
1 parent f3a1ccc commit dfa5fbe
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions config/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
upstream website {
server unix:///home/deployer/website/shared/tmp/sockets/website-puma.sock;
}

server {
listen 80 default_server;
server_name snoonet.org www.snoonet.org;

root /home/deployer/website/current/public;
access_log /home/deployer/website/current/log/nginx.access.log;
error_log /home/deployer/website/current/log/nginx.error.log info;

location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}

try_files $uri/index.html $uri @puma;
location @puma {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;

proxy_pass http://website;
}

error_page 500 502 503 504 /500.html;
client_max_body_size 10M;
keepalive_timeout 10;
}

server {
listen 443;
server_name snoonet.org www.snoonet.org;

include includes/snoonet-ssl;

root /home/deployer/website/current/public;
access_log /home/deployer/website/current/log/nginx.access.log;
error_log /home/deployer/website/current/log/nginx.error.log info;

location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}

try_files $uri/index.html $uri @puma;
location @puma {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;

proxy_pass http://website;
}

error_page 500 502 503 504 /500.html;
client_max_body_size 10M;
keepalive_timeout 10;
}

0 comments on commit dfa5fbe

Please sign in to comment.