m
This commit is contained in:
42
volumes/conf.d/zinomedia.de.conf
Normal file
42
volumes/conf.d/zinomedia.de.conf
Normal file
@@ -0,0 +1,42 @@
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name zinomedia.de;
|
||||
|
||||
access_log off;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
root /usr/share/nginx/html/zinomedia.de;
|
||||
index index.php;
|
||||
|
||||
client_max_body_size 128m;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/zinomedia.de/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/zinomedia.de/privkey.pem;
|
||||
|
||||
include "snippets/ssl-optimizations.conf";
|
||||
include "snippets/wordpress-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 / {
|
||||
resolver 127.0.0.11;
|
||||
set $upstream "zinomedia-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_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://$upstream;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name zinomedia.de;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
19
volumes/snippets/wordpress-optimizations.conf
Normal file
19
volumes/snippets/wordpress-optimizations.conf
Normal file
@@ -0,0 +1,19 @@
|
||||
location ~ /(\.user\.ini|debug\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user