Created
November 4, 2012 16:04
-
-
Save paramah/4012425 to your computer and use it in GitHub Desktop.
nginx dev template
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
server { | |
listen 80; | |
server_name @@domain@@; | |
access_log @@dir@@/access.log slim; | |
error_log @@dir@@/error.log; | |
location / { | |
root @@dir@@; | |
if (-f $request_filename) { | |
expires 30d; | |
break; | |
} | |
if (!-e $request_filename) { | |
rewrite ^(.+)$ /index.php?q=$1 last; #= | |
} | |
index index.html index.php; | |
} | |
location ~ \.php$ { | |
include /usr/local/etc/nginx/fastcgi_params; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME @@dir@@$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment