Created
March 29, 2017 14:50
-
-
Save jimitit/f1063bdd474861dff2a8efc346e7be49 to your computer and use it in GitHub Desktop.
Angular 2 + Laravel Nginx Configuration
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; | |
#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