Created
October 25, 2017 06:01
-
-
Save Maras0830/37f3a650eea9b168e7359eb84ccbbc19 to your computer and use it in GitHub Desktop.
laravel multiple project config.
This file contains 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; | |
root /var/www/Service/laravel_datacenter_api/public/; | |
server_name api.4gamers.dev; | |
index index.php index.html index.htm; | |
# resource v0,v1 api. | |
location / { | |
try_files $uri $uri/ $document_root/index.php$is_args$args; | |
location ~ \.php$ { | |
try_files $uri /index.php =404; | |
fastcgi_pass php-upstream; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
} | |
# resource v2 api | |
location ^~ /v2 { | |
alias /var/www/Service/laravel_resource_api_service/public/; | |
try_files $uri $uri/ $document_root/index.php$is_args$args; | |
error_log /var/log/nginx/v2-resource_api_service_error.log warn; | |
location ~ \.php$ { | |
try_files $uri $document_root/index.php =404; | |
fastcgi_pass php-upstream; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root/index.php; | |
include fastcgi_params; | |
} | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment