70 lines
1.9 KiB
Nginx Configuration File
70 lines
1.9 KiB
Nginx Configuration File
worker_processes auto;
|
|
pid /tmp/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
charset utf-8;
|
|
|
|
access_log off;
|
|
error_log /dev/stderr warn;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
keepalive_requests 1000;
|
|
|
|
gzip on;
|
|
gzip_comp_level 6;
|
|
gzip_proxied any;
|
|
gzip_min_length 256;
|
|
gzip_vary on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
|
|
|
server {
|
|
listen 7080;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location /mayo-manager/ {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg|map)$ {
|
|
expires 1y;
|
|
access_log off;
|
|
add_header Cache-Control "public, immutable";
|
|
add_header X-Content-Type-Options nosniff;
|
|
}
|
|
|
|
# location /assets/ {
|
|
# expires 1y;
|
|
# add_header Cache-Control "public, immutable";
|
|
# add_header X-Content-Type-Options nosniff;
|
|
# }
|
|
|
|
# BACKEND API
|
|
location /mayo-manager/api/ {
|
|
proxy_pass http://mayo-production-manager-backend:7090/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
# DJANGO ADMIN
|
|
location /mayo-manager/admin/ {
|
|
proxy_pass http://mayo-production-manager-backend:7090/admin/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
error_page 404 /index.html;
|
|
}
|
|
} |