Created
December 31, 2011 04:11
-
-
Save holachek/1542837 to your computer and use it in GitHub Desktop.
PHP doesn't work using this nginx.conf file
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
keepalive_timeout 65; | |
server { | |
listen 80; | |
server_name www.site.com site.com; | |
#charset koi8-r; | |
access_log /srv/www/site.com/logs/access.log; | |
error_log /srv/www/site.com/logs/error.log; | |
root /srv/www/site.com/public_html; | |
location / { | |
index index.html index.htm; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
location ~ \.php$ { | |
include /etc/nginx/fastcgi_params; | |
if ($uri !~ "^/images/") { | |
fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket; | |
} | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME /srv/www/site.com/public_html$fastcgi_script_name; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment