64 lines
1.3 KiB
Nginx Configuration File
64 lines
1.3 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes auto;
|
|
|
|
error_log stderr;
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
|
|
access_log /dev/stdout;
|
|
access_log /var/log/nginx/access.log;
|
|
|
|
server_tokens off;
|
|
|
|
sendfile on;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
gzip on;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
set_real_ip_from 0.0.0.0/0;
|
|
real_ip_header X-Forwarded-For;
|
|
|
|
add_header X-Frame-Options "SAMEORIGIN";
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
add_header Referrer-Policy "same-origin";
|
|
add_header Strict-Transport-Security "max-age=5184000";
|
|
|
|
location ~* ^/(_matrix|stats|js|scss|img|css|fonts|webfonts|\.well-known/matrix)+? {
|
|
access_log off;
|
|
}
|
|
|
|
location /ping {
|
|
access_log off;
|
|
return 200 "PONG";
|
|
}
|
|
|
|
location ~* \.(png|jpg|gif|svg|txt|xml)$ {
|
|
access_log off;
|
|
}
|
|
|
|
location = /favicon.ico {
|
|
access_log off;
|
|
return 302 /img/logo-transparent.png;
|
|
}
|
|
|
|
error_page 404 /404.html;
|
|
error_page 500 502 503 504 /50x.html;
|
|
}
|
|
|
|
}
|