Skip to content

Instantly share code, notes, and snippets.

@igortik
Last active April 6, 2016 18:35
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 igortik/4e3f5c135e8d6ff20587a9fd2e8e7d15 to your computer and use it in GitHub Desktop.
Save igortik/4e3f5c135e8d6ff20587a9fd2e8e7d15 to your computer and use it in GitHub Desktop.
Nginx PHP-FPM location example
server {
# ...
location ~ \.php$ {
internal;
root /path/;
# All requests to default > /index.php
try_files index.php =404;
# Config
#
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
# Params
#
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SYMLINK_PATH $domain_root;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment