Update nginx.conf
This commit is contained in:
parent
c1796c22a6
commit
ddcff48f5b
1 changed files with 22 additions and 10 deletions
26
nginx.conf
26
nginx.conf
|
@ -1,24 +1,36 @@
|
||||||
|
events {
|
||||||
|
worker_connections 512;
|
||||||
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://frontend:3000;
|
proxy_pass http://frontend:3000;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /staticfiles {
|
location /staticfiles {
|
||||||
root /etc/nginx/html/;
|
root /etc/nginx/html/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^/(api|admin) {
|
location ~ ^/(api|admin) {
|
||||||
proxy_pass http://backend:8000;
|
proxy_pass http://backend:8000;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* \.(eot|otf|ttf|woff|woff2)$ {
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
events {
|
|
||||||
# configuration of connection processing
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue