red-ui/docker/common/nginx/nginx.conf
Christoph  Schabert 4a60384e20 security adjustments
2021-11-09 15:39:10 +01:00

48 lines
1.2 KiB
Nginx Configuration File

server {
user nginx;
error_log /tmp/error.log warn;
access_log /tmp/access.log main;
pid /tmp/nginx.pid;
client_body_temp_path /tmp/nginx-client-body;
proxy_temp_path /tmp/nginx-proxy;
fastcgi_temp_path /tmp/nginx-fastcgi;
uwsgi_temp_path /tmp/nginx-uwsgi;
scgi_temp_path /tmp/nginx-scgi;
listen 8080;
proxy_hide_header WWW-Authenticate;
port_in_redirect off;
server_tokens off;
root /usr/share/nginx/html;
# SSL stuff for cloudflare proxy-ing - ignores SSL certificate and uses SNI
add_header Content-Security-Policy "default-src 'self';";
proxy_ssl_verify off;
proxy_read_timeout 1m;
proxy_ssl_server_name on;
location / {
return 302 http://$http_host/ui/;
}
location /ui/ {
proxy_hide_header WWW-Authenticate;
try_files $uri $uri/ /ui/index.html =404;
}
client_max_body_size 0;
gzip_min_length 1000;
gzip on;
gzip_http_version 1.0;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_types application/javascript text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
}