Created
July 1, 2016 20:24
-
-
Save nbpalomino/ab0b26ae65e7c516be76d50ad439228d to your computer and use it in GitHub Desktop.
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
server { | |
listen 80 default; | |
server_name laravel.app; | |
root /home/vagrant/Apps; | |
index index.php index.html; | |
autoindex on; | |
#sendfile on; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
#include /etc/nginx/sites-enabled/*; | |
location ^~ /wallet { | |
alias /home/vagrant/Apps/wallet/public; | |
index index.php; | |
try_files $uri $uri/ @wallet; | |
#rewrite ^/wallet/(.*)$ /wallet/public/index.php?$1 last; | |
location ~/wallet/.+\.php$ { | |
#root html; | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
#fastcgi_index index.php; | |
include fastcgi_params; | |
#fastcgi_param SCRIPT_FILENAME /home/vagrant/Apps/wallet/public$fastcgi_script_name; | |
#include fastcgi_params; | |
} | |
} | |
location ~ \.php$ { | |
#root html; | |
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
#set $laravel_uri $request_uri; | |
#if ($laravel_uri ~ /wallet/(/?.*)$) { | |
# set $laravel_uri $2; | |
#} | |
#fastcgi_param REQUEST_URI $laravel_uri; | |
} | |
location @pretyurls { | |
rewrite ^/ /index.php?$query_string last; | |
} | |
location @wallet { | |
rewrite /wallet/(.*)$ /wallet/index.php?$query_string last; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment