Created
September 11, 2011 21:03
-
-
Save dgoujard/1210124 to your computer and use it in GitHub Desktop.
/etc/nginx/site-enabled/default
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
server { | |
listen 80; | |
location / { | |
root html; | |
index index.php index.html; | |
if (-f $request_filename) { | |
access_log off; | |
expires max; | |
} | |
} | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
fastcgi_pass backend; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
} | |
} | |
upstream backend { | |
server unix:/var/run/php-fpm/php-fpm.sock; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment