Skip to content

Instantly share code, notes, and snippets.

@linhmtran168
Created June 3, 2015 03:35
Show Gist options
  • Save linhmtran168/66ef2d1fb9c2ccee9e1b to your computer and use it in GitHub Desktop.
Save linhmtran168/66ef2d1fb9c2ccee9e1b to your computer and use it in GitHub Desktop.
Nginx subfolder laravel
...
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