This repository has been archived by the owner on Jun 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Barfurth
committed
Jul 19, 2015
1 parent
f3a1ccc
commit dfa5fbe
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |