Change nginx configuration based on BASE_URL, instead of moving actual files

This commit is contained in:
Jatesadakarn Saengrat
2018-01-05 18:56:30 +07:00
parent a9ea10da2c
commit 8e4f94b33f
2 changed files with 5 additions and 9 deletions

View File

@@ -15,10 +15,11 @@ http {
server {
listen 8080;
server_name localhost;
index index.html index.htm;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
alias /usr/share/nginx/html/;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';