2022-08-13 11:33:40 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name birdnet.example.com;
|
|
|
|
root /var/www/html;
|
|
|
|
|
2022-08-13 12:44:01 +02:00
|
|
|
location / {
|
2022-08-13 16:00:08 +02:00
|
|
|
return 302 https://$server_name$request_uri;
|
2022-08-13 12:44:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
2022-08-13 11:33:40 +02:00
|
|
|
|
|
|
|
index index.html index.htm index.php;
|
|
|
|
|
|
|
|
location / {
|
2022-08-13 12:44:01 +02:00
|
|
|
try_files $uri $uri/ /index.php$is_args$args;
|
|
|
|
}
|
2022-08-13 11:33:40 +02:00
|
|
|
|
2022-08-13 12:44:01 +02:00
|
|
|
location ~ \.php$ {
|
2022-08-13 11:33:40 +02:00
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
fastcgi_pass unix:/run/php-fpm/www.sock;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi.conf;
|
2022-08-13 12:44:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
access_log /var/log/nginx/birdnet/birdnet-access.log;
|
|
|
|
error_log /var/log/nginx/birdnet/birdnet-error.log error;
|
|
|
|
}
|