Created
June 3, 2015 03:35
-
-
Save linhmtran168/66ef2d1fb9c2ccee9e1b to your computer and use it in GitHub Desktop.
Nginx subfolder laravel
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 /tms/server { | |
try_files $uri $uri/ /tms/server/public/index.php?$args; | |
index index.html index.htm index.php; | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include /etc/nginx/fastcgi_params; | |
set $laravel_uri $request_uri; | |
if ($laravel_uri ~ tms/server(/?.*)$) { | |
set $laravel_uri $1; | |
} | |
fastcgi_param REQUEST_URI $laravel_uri; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment