65 lines
1.8 KiB
Plaintext
65 lines
1.8 KiB
Plaintext
# HTTPS Server Block
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name 4netplayers.zinomedia.de;
|
|
|
|
root /usr/share/nginx/html/4netplayers.zinomedia.de;
|
|
index index.php;
|
|
|
|
client_max_body_size 32m;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/4netplayers.zinomedia.de/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/4netplayers.zinomedia.de/privkey.pem;
|
|
|
|
# SSL Optimizations
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_timeout 10m;
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; font-src 'self' data:;" always;
|
|
|
|
location ~ /(\.user\.ini|debug\.log) {
|
|
deny all;
|
|
}
|
|
|
|
location / {
|
|
resolver 127.0.0.11;
|
|
set $upstream "4netplayers-wordpress:80";
|
|
|
|
try_files $uri $uri/ /index.php?$args;
|
|
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
proxy_set_header X-Forwarded-Server $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_pass http://$upstream;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
location = /favicon.ico {
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
|
|
location = /robots.txt {
|
|
allow all;
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
|
expires max;
|
|
log_not_found off;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name 4netplayers.zinomedia.de;
|
|
return 301 https://$host$request_uri;
|
|
}
|