forked from github/plane
37 lines
949 B
Nginx Configuration File
37 lines
949 B
Nginx Configuration File
events { }
|
|
|
|
|
|
http {
|
|
sendfile on;
|
|
upstream django {
|
|
server planebackend:8000;
|
|
}
|
|
upstream nextjs {
|
|
server planefrontend:3000;
|
|
}
|
|
server {
|
|
listen 80;
|
|
root /www/data/;
|
|
access_log /var/log/nginx/access.log;
|
|
location / {
|
|
|
|
proxy_pass http://planefrontend:3000/;
|
|
proxy_set_header Host $host;
|
|
add_header Access-Control-Allow-Origin *;
|
|
add_header Access-Control-Allow-Credentials true
|
|
add_header Access-Control-Allow-Methods GET, POST, OPTIONS, PUT;
|
|
|
|
}
|
|
location /api/ {
|
|
proxy_pass http://planebackend:8000/api/;
|
|
proxy_set_header Host $host;
|
|
add_header Access-Control-Allow-Origin *;
|
|
add_header Access-Control-Allow-Credentials true
|
|
add_header Access-Control-Allow-Methods GET, POST, OPTIONS, PUT;
|
|
}
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|
|
} |