Minor improvements.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
# Uses https://github.com/acmesh-official/acme.sh to manage SSL certificates.
|
||||
|
||||
# Flags the non 2xx or non 3xx (probably error) responses.
|
||||
map $status $errorlog { ~^[23] 0; default 1; }
|
||||
map $status $errorlog_$PAR_PROXYPORT { ~^[23] 0; default 1; }
|
||||
|
||||
# Virtualhost's configuration follows.
|
||||
server {
|
||||
@ -12,12 +12,12 @@ server {
|
||||
server_name_in_redirect on;
|
||||
server_name $PAR_SERVERNAME;
|
||||
|
||||
set $server_admin webmaster@$server_name;
|
||||
set $server_admin $PAR_WEBMASTER;
|
||||
|
||||
# access log and error log.
|
||||
# Any requests getting a non 2xx or non 3xx response will go to the error log as well.
|
||||
access_log $PAR_SERVICE/logs/web/access.log combined;
|
||||
access_log $PAR_SERVICE/logs/web/error.log combined if=$errorlog;
|
||||
access_log $PAR_SERVICE/logs/web/error.log combined if=$errorlog_$PAR_PROXYPORT;
|
||||
|
||||
# Let's Encrypt (acme.sh) support.
|
||||
location /.well-known/ {
|
||||
@ -62,11 +62,13 @@ server {
|
||||
"<span style='font-size: x-large'>Sorry something went wrong. Try again a bit later.<br>
|
||||
You may report this at <a href='mailto:$server_admin'>$server_admin</a>.</span>";
|
||||
}
|
||||
|
||||
# No static service.
|
||||
# No static service, but we may provide the OPTIONS for a potential DAV client.
|
||||
# location / {
|
||||
# default_type text/html;
|
||||
# return 404 "<span style='font-size: x-large'>Sorry try <a href='$scheme://$server_name/$PAR_LOCATION'>$scheme://$server_name/$PAR_LOCATION</a> instead.</span>";
|
||||
# default_type text/html;
|
||||
## dav_ext_methods OPTIONS;
|
||||
# if ($request_method != OPTIONS) {
|
||||
# return 404 "<span style='font-size: x-large'>Sorry try <a href='$scheme://$server_name/$PAR_LOCATION'>$scheme://$server_name/$PAR_LOCATION</a> instead.</span>";
|
||||
## return 302 $scheme://$server_name/$PAR_LOCATION;
|
||||
# }
|
||||
|
||||
##################################################################################
|
||||
|
Reference in New Issue
Block a user