Created
May 13, 2015 11:16
-
-
Save torniker/d09db27177e158568a51 to your computer and use it in GitHub Desktop.
Nginx phpfmp configuration for laravel
This file contains hidden or 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
upstream phpfcgi { | |
server phpfpm:9000; | |
} | |
server { | |
listen 80 default; | |
server_name local.dev; | |
root /var/www/public; | |
index index.php index.html index.htm; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
try_files $uri /index.php =404; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass phpfcgi; | |
fastcgi_param SCRIPT_FILENAME /var/www/html/public$fastcgi_script_name; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_index index.php; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment