63 lines
1.0 KiB
Nginx Configuration File
63 lines
1.0 KiB
Nginx Configuration File
user nginx;
|
|
pid /run/nginx.pid;
|
|
worker_processes 1;
|
|
error_log /dev/stderr warn;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
access_log off;
|
|
server_tokens off;
|
|
client_max_body_size 100m;
|
|
keepalive_timeout 65;
|
|
sendfile on;
|
|
tcp_nodelay on;
|
|
|
|
server {
|
|
listen 8006;
|
|
server_name localhost;
|
|
|
|
location /robots.txt {
|
|
alias /srv/cts/cts/static/robots.txt;
|
|
}
|
|
|
|
location /media {
|
|
alias /srv/cts/cts/media;
|
|
}
|
|
|
|
location /static {
|
|
gzip on;
|
|
alias /srv/cts/cts/static;
|
|
expires max;
|
|
add_header Cache-Control public;
|
|
|
|
location /static/protected {
|
|
return 401;
|
|
}
|
|
}
|
|
|
|
location /protected {
|
|
internal;
|
|
root /srv/cts/cts/static;
|
|
}
|
|
|
|
error_page 502 503 504 /502.html;
|
|
|
|
location /502.html {
|
|
alias /srv/cts/cts/static/502.html;
|
|
}
|
|
|
|
location / {
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://127.0.0.1:8000;
|
|
}
|
|
}
|
|
}
|