Created
February 2, 2015 17:50
-
-
Save mpautasso/997a12ffcdb23ddc5e8e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 site_server { | |
server unix:/tmp/site.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name lottosend.sk, www.lottosend.sk; | |
return 301 $scheme://www.lottosend.com$request_uri; | |
} | |
server { | |
listen 80; | |
server_name lottosend.cz, www.lottosend.cz; | |
return 301 $scheme://www.lottosend.com$request_uri; | |
} | |
server { | |
listen 80; | |
listen 443; | |
ssl off; | |
server_name lottosend.com; | |
ssl_certificate /etc/nginx/ssl/ev_ssl/ssl-bundle-EV.crt; | |
ssl_certificate_key /etc/nginx/ssl/ev_ssl/server.key; | |
return 301 $scheme://www.lottosend.com$request_uri; | |
} | |
server { | |
listen 80; | |
listen 443 ssl; | |
ssl off; | |
server_name www.lottosend.com; | |
ssl_certificate /etc/nginx/ssl/ev_ssl/ssl-bundle-EV.crt; | |
ssl_certificate_key /etc/nginx/ssl/ev_ssl/server.key; | |
root /home/deploy/site.numgames.com/current/public/; | |
try_files $uri/index.html $uri @site_server; | |
location @site_server { | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://site_server; | |
} | |
location /blog/ { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param HTTPS on; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
if (!-e $request_filename) { | |
rewrite ^(.*)$ /blog/index.php?q=$1 last; | |
} | |
} | |
location ~ /blog/(.+).(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ { | |
access_log off; | |
expires max; | |
} | |
error_page 500 502 503 504 /500.html; | |
client_max_body_size 4G; | |
keepalive_timeout 10; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment