Forum

Trouble with access to /.well-known

Mustafa Ramadhan
11 May 2016, 07:19
1. Using Hiawatha 10.1 and 10.2
2. Create '/var/run/letsencrypt/.well-known/acme-challenge'
3. Add 'index.html' in '/var/run/letsencrypt/.well-known' and '/var/run/letsencrypt/.well-known/acme-challenge' with 'Hi' content
4. Add Alias and UseDirectory:
Directory {
DirectoryID = well_known
Path = /.well-known
AccessList = allow all
}
VirtualHost {
Hostname = xl1.mratwork.com, www.xl1.mratwork.com, *.xl1.mratwork.com
...
Alias = /.well-known:/var/run/letsencrypt/.well-known
UseDirectory = well_known
AllowDotFiles = yes
...
}


The same way for step 4 for:

1. Apache
<VirtualHost *:80 >
ServerName xl1.mratwork.com
ServerAlias www.xl1.mratwork.com *.xl1.mratwork.com
...
Alias "/.well-known/" "/var/run/letsencrypt/.well-known/"

<Directory "/var/run/letsencrypt/.well-known/">
AllowOverride None
Options None
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
...
</VirtualHost>


2. Nginx
server {
server_name xl1.mratwork.com www.xl1.mratwork.com *.xl1.mratwork.com;
...
location /.well-known/ {
alias /var/run/letsencrypt/.well-known/;
allow all;
}
...
}


3. Lighttpd
$HTTP["host"] =~ "(?:^|\.)xl1\.mratwork\.com$" {
...
$HTTP["url"] =~ "^/.well-known/" {

#server.document-root = "/var/run/letsencrypt/"
alias.url += ( "/.well-known/" => "/var/run/letsencrypt/.well-known/" )
#dir-listing.activate = "enable"
url.access-deny = ( "disable" )

index-file.names = ( "index.html" )

}
...
}


So, access to 'http://xl1.mratwork.com/.well-known/acme-challenge' (or 'http://xl1.mratwork.com/.well-known/acme-challenge/index.html') will be appear 'file not found' for hiawatha but 'Hi' with other (lighttpd, nginx and apache).

The same result for access to 'http://xl1.mratwork.com/.well-known'.
Mustafa Ramadhan
13 May 2016, 14:58
Look like OK using 10.2 with latest compile.
This topic has been closed.