server {
listen ipv4-address:80;
listen [ipv6-address]:80;
root /home/www/name.tld/;
index index.html index.htm index.php;
server_name name.tld www.name.tld;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
rewrite ^ https://$server_name$request_uri permanent;
add_header X-Frame-Options SAMEORIGIN;
server_tokens off;
}
server {
listen 5.196.43.239:443 ssl http2;
listen [2001:41d0:1:7f4a::3]:443 ssl http2;
root /home/www/name.tld/;
access_log /var/log/nginx/access-name_tld.log;
server_name name.tld www.name.tld;
error_log /var/log/nginx/error-name_tld.log;
index index.html index.htm index.php;
server_tokens off;
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ \.php$ {
client_max_body_size 1280M;
try_files $uri = 404;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
add_header Strict-Transport-Security max-age=63072000;
add_header X-Frame-Options SAMEORIGIN;
ssl on;
ssl_certificate /etc/letsencrypt/live/name.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/name.tld/privkey.pem;
ssl_session_timeout 10m;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/ssl/dhparams.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #no SSLv3: POODLE
ssl_ciphers 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4';