Skip to content

Instantly share code, notes, and snippets.

@diwakergupta
Last active January 11, 2016 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diwakergupta/4b1cba55ed00da009dbd to your computer and use it in GitHub Desktop.
Save diwakergupta/4b1cba55ed00da009dbd to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name example.com www.example.com;
root /path/to/example.com;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
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