2022-08-22 06:22:30 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name <SERVER_NAME>;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
return 302 https://$host$request_uri;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /.well-known/acme-challenge {
|
|
|
|
alias /var/www/html/.well-known/acme-challenge;
|
|
|
|
allow all;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
|
|
|
server_name <SERVER_NAME>;
|
|
|
|
|
|
|
|
fastcgi_buffers 16 16k;
|
|
|
|
fastcgi_buffer_size 32k;
|
|
|
|
|
|
|
|
root <SYMFONY_PUBLIC>;
|
|
|
|
|
|
|
|
ssl_certificate <CERTIFICATE>;
|
|
|
|
ssl_certificate_key <PRIVATE_KEY>;
|
|
|
|
|
|
|
|
index index.php;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
try_files $uri $uri/ /index.php$is_args$args;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ^~ /media/records {
|
|
|
|
autoindex on;
|
|
|
|
alias <RECORDS_FOLDER>;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ^~ /media/charts {
|
|
|
|
autoindex on;
|
|
|
|
alias <CHARTS_FOLDER>;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ \.php$ {
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
2022-08-22 18:49:40 +02:00
|
|
|
fastcgi_pass <PHP_FPM_HOST>:<PHP_FPM_PORT>;
|
2022-08-22 06:22:30 +02:00
|
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi.conf;
|
|
|
|
}
|
|
|
|
|
|
|
|
access_log /var/log/nginx/birdnet-access.log;
|
|
|
|
error_log /var/log/nginx/birdnet-error.log error;
|
|
|
|
}
|