2018-02-01 14:01:05 +01:00
|
|
|
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;
|
|
|
|
sendfile on;
|
2020-02-07 18:27:15 +01:00
|
|
|
tcp_nodelay on;
|
2018-02-09 14:31:55 +01:00
|
|
|
send_timeout 300;
|
2018-02-01 14:01:05 +01:00
|
|
|
|
|
|
|
server {
|
2018-03-25 23:09:53 +02:00
|
|
|
listen 8080;
|
2018-02-01 14:01:05 +01:00
|
|
|
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;
|
2018-04-29 20:51:20 +02:00
|
|
|
proxy_set_header X-Forwarded-Host $http_host;
|
2018-02-01 14:01:05 +01:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
2018-02-09 14:31:55 +01:00
|
|
|
proxy_connect_timeout 300;
|
|
|
|
proxy_send_timeout 300;
|
|
|
|
proxy_read_timeout 300;
|
2018-02-01 14:01:05 +01:00
|
|
|
proxy_pass http://127.0.0.1:8000;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|