mirror of
https://github.com/Labelbase/Labelbase.git
synced 2026-08-13 12:33:23 +02:00
62 lines
1.3 KiB
Nginx Configuration File
62 lines
1.3 KiB
Nginx Configuration File
worker_processes 1;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
upstream labelbase_django {
|
|
server labelbase_django:8000;
|
|
}
|
|
|
|
server {
|
|
listen 8080;
|
|
client_max_body_size 69M;
|
|
server_name localhost;
|
|
charset utf-8;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
location / {
|
|
proxy_pass http://labelbase_django;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
location /static {
|
|
autoindex off;
|
|
index index.html;
|
|
root /app;
|
|
break;
|
|
}
|
|
|
|
location /media {
|
|
autoindex off;
|
|
index index.html;
|
|
root /app;
|
|
break;
|
|
}
|
|
|
|
location /attachments/attachment {
|
|
autoindex off;
|
|
index index.html;
|
|
root /app;
|
|
break;
|
|
}
|
|
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|
|
}
|