Skip to content

Instantly share code, notes, and snippets.

@naeluh
Last active December 20, 2015 05:59
Show Gist options
  • Save naeluh/6082729 to your computer and use it in GitHub Desktop.
Save naeluh/6082729 to your computer and use it in GitHub Desktop.
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www/www.toughcom.net/public_html/public;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name toughcom.net;
location / {
index index.php;
# This is cool because no php is touched for static content
try_files $uri $uri/ @rewrite;
expires max;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
#fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment