nginx-acme.sh-bootstrapping/000-default.conf

56 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2018-05-25 18:16:30 +02:00
server {
listen 80 default_server;
listen [::]:80 default_server;
include letsencrypt.conf;
server_name _;
return 301 https://$host$request_uri;
}
server {
http2 on;
listen 443 ssl;
listen [::]:443 ssl;
2018-05-25 18:16:30 +02:00
server_name _;
root /var/www/html;
ssl_certificate /srv/ssl/default/fullchain.pem;
ssl_certificate_key /srv/ssl/default/key.pem;
server_tokens off;
include ssl_params.conf;
include letsencrypt.conf;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
2018-10-25 06:43:57 +02:00
index index.nginx-debian.html index.html index.htm;
2018-05-25 18:16:30 +02:00
charset utf-8;
location / {
try_files $uri $uri/ =404;
}
location /.well-known {
auth_basic "off";
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
2018-10-23 14:54:17 +02:00
2022-12-27 19:39:45 +01:00
# Uncomment for PHP support (check /etc/nginx/phpfpm.conf), assumes PHP 8.1 FPM is installed.
2018-10-23 15:00:48 +02:00
# include phpfpm.conf;
2018-05-25 18:16:30 +02:00
access_log /var/log/nginx/default-access.log combined;
error_log /var/log/nginx/default-error.log error;
location ~ /\.ht {
deny all;
}
}