问题原文
原帖链接 · Joachim Breitner · CC BY-SA 3.0
I have a global entry
Alias /.well-known/acme-challenge /var/www/letsencrypt/.well-known/acme-challenge/
in my apache configuration, outside any virtual host. This way, the above Alias is effective for all virtual hosts. Unfortunately, there are still virtual hosts where this does not work as intended, e.g. due to redirects, authetication requirements etc.
Is there a way to tell apache to consider this alias before even reading the configuration of the particular virtual host?
已采纳解答
原帖链接 · Froggiz · CC BY-SA 3.0
You can try to add this before all your virtual host :
Alias /.well-known/acme-challenge/ /var/www/letsencrypt/.well-known/acme-challenge/
#Bypass Auth
<Directory /var/www/letsencrypt/.well-known/acme-challenge/>
Satisfy any
</Directory>
#Redirect before other rewrite rules
RewriteCond %{REQUEST_URI} /\.well\-known/acme\-challenge/
RewriteRule (.*) /.well-known/acme-challenge/$1 [L,QSA]
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
