.well-known/.host-meta is ignored in .htaccess

heluecht

New member
Joined
Aug 21, 2017
Messages
2
Hi!

I'm one of the developers of Friendica, a decentralized social network. An user created an issue that is related to DirectAdmin:

https://github.com/friendica/friendica/issues/3624

Friendica needs access to the folder ".well-known/.host-meta" which we realize with a rewrite rule in the .htaccess file. Problem is: This is a fixed path and cannot be renamed in any way.

This doesn't work at the machine that our user is using. His technical support then told him that this is related to DirectAdmin.

Now the question is: Is this true? Or is there any way that the rewrite rule is working for the ".well-known" directory?

I don't have any access to this machine and our user isn't an admin on that system. So a link to a possible solution would be fine, then we could forward it.

If someones sees a possible workaround without using the .htaccess I would be happy as well.

Thanks!
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,880
Location
GMT +7.00
Hello,

Actually it was and old way to point an alias (it used to be this way some time ago)

Code:
Alias /.well-known /var/www/html/.well-known
and new alias is as the following (it is how it is set nowadays):

Code:
Alias /.well-known/acme-challenge /var/www/html/.well-known/acme-challenge
The First way to update the alias:

So you need to update /etc/httpd/conf/extra/httpd-alias.conf and change:

Code:
Alias /.well-known /var/www/html/.well-known
to


Code:
Alias /.well-known/acme-challenge /var/www/html/.well-known/acme-challenge
and restart apache.

or

The second way to update the alias

1. remove Alias /.well-known /var/www/html/.well-known from /etc/httpd/conf/extra/httpd-alias.conf
2. run

Code:
cd /usr/local/directadmin/custombuild
./build update
./build rewrite_confs
and you will get the same result:

Code:
Alias /.well-known/acme-challenge /var/www/html/.well-known/acme-challenge
That's it
 
Top