Created
May 13, 2016 23:00
-
-
Save kddlb/7f26a6c4d10eeec3b461cb59ed79f44f to your computer and use it in GitHub Desktop.
NGINX recipe for Polr and PHP 7
This file contains 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
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