Add ssl conf
This commit is contained in:
parent
29dcd4c999
commit
0399fa085e
|
@ -3,19 +3,33 @@ server {
|
||||||
server_name birdnet.example.com;
|
server_name birdnet.example.com;
|
||||||
root /var/www/html;
|
root /var/www/html;
|
||||||
|
|
||||||
access_log /var/log/nginx/birdnet/birdnet-access.log;
|
location / {
|
||||||
error_log /var/log/nginx/birdnet/birdnet-error.log error;
|
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;
|
index index.html index.htm index.php;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_pass unix:/run/php-fpm/www.sock;
|
fastcgi_pass unix:/run/php-fpm/www.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
include fastcgi.conf;
|
include fastcgi.conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
access_log /var/log/nginx/birdnet/birdnet-access.log;
|
||||||
|
error_log /var/log/nginx/birdnet/birdnet-error.log error;
|
||||||
}
|
}
|
Loading…
Reference in New Issue