Add ssl conf

This commit is contained in:
Samuel Ortion 2022-08-13 12:44:01 +02:00
parent 29dcd4c999
commit 0399fa085e
1 changed files with 21 additions and 7 deletions

View File

@ -3,8 +3,19 @@ server {
server_name birdnet.example.com;
root /var/www/html;
access_log /var/log/nginx/birdnet/birdnet-access.log;
error_log /var/log/nginx/birdnet/birdnet-error.log error;
location / {
return 302 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name birdnet.example.com;
root /var/www/html;
ssl on;
ssl_certificate /etc/nginx/ssl/birdnet.crt;
ssl_certificate_key /etc/nginx/ssl/birdnet.key;
index index.html index.htm index.php;
@ -18,4 +29,7 @@ server {
fastcgi_index index.php;
include fastcgi.conf;
}
access_log /var/log/nginx/birdnet/birdnet-access.log;
error_log /var/log/nginx/birdnet/birdnet-error.log error;
}