Created
April 24, 2015 08:21
-
-
Save abyshakes/d1126a84c004f3b0f15d to your computer and use it in GitHub Desktop.
Laravel Nginx Subdirectory
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
location ^~ /apis { | |
alias /usr/share/nginx/aby_api/public; | |
try_files $uri $uri/ @laravel; | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
} | |
location @laravel { | |
rewrite /apis/(.*)$ /apis/index.php?$1 last; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment