Created
May 20, 2013 20:02
-
-
Save toomuchpete/5615044 to your computer and use it in GitHub Desktop.
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 unicorn { | |
server unix:/tmp/unicorn.sock:; | |
} | |
server { | |
listen 80; | |
server_name leagues.afdc.local; | |
root /var/www/leagues.afdc.com/; | |
access_log /var/log/leagues.afdc.com/access.log; | |
error_log /var/log/leagues.afdc.com/error.log warn; | |
index index.php index.html; | |
try_files $uri $uri/ /index.php?$args; | |
location /users/ { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://unix:/tmp/unicorn.sock:; | |
} | |
location /assets/ { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://unix:/tmp/unicorn.sock:; | |
} | |
location ~ \.php$ | |
{ | |
fastcgi_pass php5-fpm-sock; | |
fastcgi_index index.php; | |
fastcgi_param PHP_VALUE "display_errors=on"; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include /etc/nginx/fastcgi_params; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment