Created
July 7, 2014 21:34
-
-
Save MikeRogers0/081aaaad2df35d2fb858 to your computer and use it in GitHub Desktop.
My NGINX conf for PHP sites
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 _; | |
root /vagrant/www; | |
index index.html index.htm index.php; | |
expires -1; | |
location / { | |
try_files $uri $uri/ /index.php?q=$uri&$args; | |
} | |
# pass the PHP scripts to FastCGI server listening socket | |
location ~ \.php$ { | |
fastcgi_pass unix://var/run/php5-fpm.sock; | |
fastcgi_keep_conn on; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param HTTPS off; | |
fastcgi_read_timeout 360; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment