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