Answer all Let's Encrypt challenges via alias to a directory in Froxlor itself, enables us to answer challenges before the vhost is set, thx PrfDrDrStullenBr for the idea \(vhost - configs for most distributions untested\)
Signed-off-by: Florian Aders <eleras@froxlor.org>
This commit is contained in:
@@ -82,6 +82,15 @@
|
||||
Require env REDIRECT_STATUS
|
||||
</Location>
|
||||
</IfModule>
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/apache2/conf-enabled/acme.conf">
|
||||
<content><![CDATA[
|
||||
Alias "/.well-known/acme-challenge" "{{const.FROXLOR_INSTALL_DIR}}/.well-known/acme-challenge"
|
||||
<Directory "/var/www/.well-known/acme-challenge">
|
||||
Require all granted
|
||||
</Directory>
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
@@ -116,6 +125,8 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
|
||||
compress.cache-dir = "/var/cache/lighttpd/compress/"
|
||||
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
|
||||
|
||||
alias.url += ("/.well-known/acme-challenge/" => "{{const.FROXLOR_INSTALL_DIR}}/.well-known/acme-challenge/")
|
||||
|
||||
# default listening port for IPv6 falls back to the IPv4 port
|
||||
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
|
||||
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
||||
@@ -287,6 +298,18 @@ fastcgi_param SERVER_NAME $server_name;
|
||||
|
||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/nginx/conf.d/acme.conf">
|
||||
<content><![CDATA[
|
||||
location /.well-known/acme-challenge {
|
||||
alias {{const.FROXLOR_INSTALL_DIR}};
|
||||
|
||||
location ~ /.well-known/acme-challenge/(.*) {
|
||||
default_type text/plain;
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
|
||||
Reference in New Issue
Block a user