servnest-mkosi/install/nginx/sites/http.conf

26 lines
607 B
Plaintext
Raw Normal View History

# This server block should listen on port 80 to warn users they tried to make an unsecure connection
2022-04-20 00:29:47 +02:00
server {
listen [::1]:42080 default_server;
listen 127.0.0.1:42080 default_server;
location / {
return 403; # Don't allow unsecure HTTP requests
}
2022-04-20 00:29:47 +02:00
# Display an explanation page
error_page 403 @http403;
location @http403 {
2023-01-29 21:14:36 +01:00
root /srv/servnest/errors;
2022-04-20 00:29:47 +02:00
try_files /http.php =500;
index http.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
2023-01-29 21:14:36 +01:00
fastcgi_pass unix:/run/php-fpm/servnest.sock;
2022-04-20 00:29:47 +02:00
include inc/fastcgi.conf;
}
location /.well-known/acme-challenge {
2023-01-29 21:14:36 +01:00
root /srv/servnest/acme/;
}
2022-04-20 00:29:47 +02:00
}