Skip to content

Instantly share code, notes, and snippets.

@Foxandxss
Created October 29, 2014 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Foxandxss/a48b2ce2ded95621a0ea to your computer and use it in GitHub Desktop.
Save Foxandxss/a48b2ce2ded95621a0ea to your computer and use it in GitHub Desktop.
nginx conf to serve php on /api
server {
server_name mroot.local;
root /var/www/laravel/mroot/client/tmp;
location / {
index index.html;
try_files $uri $uri/ /index.html =404;
}
location /api {
root /var/www/laravel/mroot/foo/public;
try_files /index.php =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param APP_ENV dev;
fastcgi_pass 127.0.0.1:9000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment