62 lines
1.6 KiB
Plaintext
62 lines
1.6 KiB
Plaintext
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name 4netplayers.zinomedia.de;
|
|
|
|
access_log off;
|
|
error_log /var/log/nginx/error.log error;
|
|
|
|
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;
|
|
|
|
include "snippets/ssl-optimizations.conf";
|
|
|
|
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;
|
|
}
|