Last active
August 29, 2015 14:04
-
-
Save safecat/52274d8ffcedc07ccff3 to your computer and use it in GitHub Desktop.
Laravel in Subfolder (rename public to subfolder name)
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
Laravel in Subfolder (rename public to subfolder name) | |
===INTRO=== | |
Assume we need http://localhost/miao/ instead of http://localhost/laravel_app/public/ | |
===FILES=== | |
|laravel_app | |
|-app | |
|-bootstrap | |
|-miao(rename from public) | |
|-vendor | |
|-server.php | |
|-etc... | |
===Nginx=== | |
location /miao { | |
root /www/laravel_app; | |
index index.php; | |
try_files $uri $uri/ $uri/index.php /miao/index.php?$args; | |
location ~ \.php(?|$) { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
} | |
===bootstrap/paths.php=== | |
'public' => __DIR__.'/../miao', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment