server { listen [::]:80; server_name agenda.hebrewtools.org www.agenda.hebrewtools.org; access_log /var/log/nginx/agenda.hebrewtools.org.access.log; error_log /var/log/nginx/agenda.hebrewtools.org.error.log; return 301 https://agenda.hebrewtools.org$request_uri; } server { listen [::]:443; root /var/www/agenda.hebrewtools.org; index list.php; charset utf-8; server_name agenda.hebrewtools.org; access_log /var/log/nginx/agenda.hebrewtools.org.access.log; error_log /var/log/nginx/agenda.hebrewtools.org.error.log; include /etc/nginx/confsnippets/ssl.conf; ssl_certificate /etc/letsencrypt/live/agenda.hebrewtools.org/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/agenda.hebrewtools.org/privkey.pem; location / { autoindex off; } location ~ (add|fetch)\.php { auth_basic "Agenda administration is only available after login:"; auth_basic_user_file /etc/nginx/htpasswds/agenda.hebrewtools.org; include /etc/nginx/confsnippets/fastcgi.conf; } location ~ \.php$ { include /etc/nginx/confsnippets/fastcgi.conf; } include /etc/nginx/confsnippets/letsencrypt.conf; location ~ /\. { deny all; } include /etc/nginx/confsnippets/expires.conf; }