nginx-config/nginx.conf
2020-02-08 13:39:34 +03:00

46 lines
1.5 KiB
Nginx Configuration File

worker_processes 1;
events {
worker_connections 1024;
}
http {
resolver 127.0.0.1;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 10;
server {
listen 3002;
server_name localhost;
set $udsRoot "/Users/teacher/teaching/2020/project";
root $udsRoot;
# index.html bootstrap
location / {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
index index.html index.htm;
alias "$udsRoot/uds-middle/dist/";
}
# index.html bootstrap
location /bootstrap.js {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
alias "$udsRoot/uds-bootstrap/dist/bootstrap.js";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}