Created
February 9, 2012 16:10
-
-
Save chiel/1780846 to your computer and use it in GitHub Desktop.
Nginx config for tinker
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
upstream tinker { | |
server unix:/tmp/thin.0.sock; | |
server unix:/tmp/thin.1.sock; | |
server unix:/tmp/thin.2.sock; | |
server unix:/tmp/thin.3.sock; | |
server unix:/tmp/thin.4.sock; | |
} | |
server { | |
listen 80; | |
server_name tinker.io *.tinker.io; | |
rewrite ^ https://tinker.io$request_uri permanent; | |
} | |
server { | |
listen 80; | |
server_name tinkrbox.net *.tinkrbox.net; | |
rewrite ^ https://tinkrbox.net$request_uri permanent; | |
} | |
server { | |
listen 443; | |
ssl on; | |
ssl_certificate /etc/ssl/tinker.io.pem; | |
ssl_certificate_key /etc/ssl/tinker.io.key; | |
server_name alpha.tinker.io www.tinker.io; | |
rewrite ^ https://tinker.io$request_uri permanent; | |
} | |
server { | |
listen 443; | |
ssl on; | |
ssl_certificate /etc/ssl/tinkrbox.net.pem; | |
ssl_certificate_key /etc/ssl/tinkrbox.net.key; | |
server_name tinkrbox.net; | |
root /www/sites/tinker.io/public; | |
location @thin { | |
expires off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_pass http://tinker; | |
} | |
location / { | |
proxy_redirect off; | |
proxy_max_temp_file_size 0; | |
try_files $uri @thin; | |
} | |
} | |
server { | |
listen 443; | |
ssl on; | |
ssl_certificate /etc/ssl/tinker.io.pem; | |
ssl_certificate_key /etc/ssl/tinker.io.key; | |
server_name tinker.io sandbox.tinker.io; | |
root /www/sites/tinker.io/public; | |
location @thin { | |
expires off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_pass http://tinker; | |
} | |
location / { | |
proxy_redirect off; | |
proxy_max_temp_file_size 0; | |
try_files $uri @thin; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment