Skip to content

Instantly share code, notes, and snippets.

@nbpalomino
Created July 1, 2016 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbpalomino/ab0b26ae65e7c516be76d50ad439228d to your computer and use it in GitHub Desktop.
Save nbpalomino/ab0b26ae65e7c516be76d50ad439228d to your computer and use it in GitHub Desktop.
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