Created
October 19, 2013 03:53
-
-
Save azhai/7051464 to your computer and use it in GitHub Desktop.
Nginx PHP (Simple)
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 blog.com; | |
root /var/www/wordpress; | |
set $var_sessid "-"; | |
access_log logs/blog.access.log main; | |
#charset utf-8; | |
index index.html index.php; | |
error_page 404 /404.html; | |
if (!-e $request_filename) { | |
rewrite .* /index.php$request_uri last; | |
} | |
location ~ \.(svn|git|hg|bzr|cvs) { | |
return 404; | |
} | |
location ~* \.php { | |
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment