2022-08-21 07:52:41 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
2022-08-22 06:22:30 +02:00
|
|
|
server_name <SERVER_NAME>;
|
2022-08-21 07:52:41 +02:00
|
|
|
|
|
|
|
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;
|
2022-08-22 06:22:30 +02:00
|
|
|
server_name <SERVER_NAME>;
|
2022-08-21 07:52:41 +02:00
|
|
|
|
|
|
|
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;
|
2022-08-22 20:27:33 +02:00
|
|
|
alias <RECORDS_DIR>;
|
2022-08-21 07:52:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
location ^~ /media/charts {
|
|
|
|
autoindex on;
|
2022-08-22 20:27:33 +02:00
|
|
|
alias <CHARTS_DIR>;
|
2022-08-21 07:52:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
location ~ \.php$ {
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
2022-08-21 08:17:16 +02:00
|
|
|
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
|
2022-08-21 07:52:41 +02:00
|
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi.conf;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /stream {
|
|
|
|
proxy_pass http://localhost:8000/stream;
|
|
|
|
}
|
|
|
|
|
2022-08-21 11:50:33 +02:00
|
|
|
location ~ ^/ttyd(.*)$ {
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_pass http://127.0.0.1:7681/$1;
|
|
|
|
}
|
|
|
|
|
2022-08-21 07:52:41 +02:00
|
|
|
access_log /var/log/nginx/birdnet/birdnet-access.log;
|
|
|
|
error_log /var/log/nginx/birdnet/birdnet-error.log error;
|
|
|
|
}
|