Skip to content

Instantly share code, notes, and snippets.

@jimitit
Created March 29, 2017 14:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimitit/f1063bdd474861dff2a8efc346e7be49 to your computer and use it in GitHub Desktop.
Save jimitit/f1063bdd474861dff2a8efc346e7be49 to your computer and use it in GitHub Desktop.
Angular 2 + Laravel Nginx Configuration
server {
listen 80;
#listen [::]:80;
server_name dev.hio.com;
root /Users/jimit/Code/rl_projects/hio/api/public;
access_log /Users/jimit/Code/rl_projects/hio/api/storage/local/nginx.access.log;
error_log /Users/jimit/Code/rl_projects/hio/api/storage/local/nginx.error.log;
location / {
alias /Users/jimit/Code/rl_projects/hio/front/dist/;
try_files $uri $uri/ /index.html?$args;
}
location /api/ {
try_files $uri $uri/ /index.php?$is_args$args;
}
location ~ \.php$ {
include /usr/local/etc/nginx/conf.d/php-fpm;
try_files $uri =404;
}
location ~ /\. {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment