Skip to content

Instantly share code, notes, and snippets.

@kddlb
Created May 13, 2016 23:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kddlb/7f26a6c4d10eeec3b461cb59ed79f44f to your computer and use it in GitHub Desktop.
Save kddlb/7f26a6c4d10eeec3b461cb59ed79f44f to your computer and use it in GitHub Desktop.
NGINX recipe for Polr and PHP 7
location / {
try_files $uri $uri/ /index.php?$query_string;
rewrite ^/([a-zA-Z0-9]+)/?$ /index.php?$1;
}
location ~ \.(php|phar)$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.(?:php|phar))(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-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