0

I have:

<VirtualHost *:80>
    ServerName subdomain.maindomain.com
    DocumentRoot /var/www/subdomainFolder/public_html
    <Directory "/var/www/subdomainFolder/public_html/">
        Options FollowSymLinks
        AllowOverride All
        Allow from All
    </Directory>
</VirtualHost>

However when I do curl http://subdomain.mainDomain.com/.well-known/index.html I get a 404 error (there is a file at /var/www/subdomainFolder/public_html/.well-known/index.html)

I've even tried adding RedirectMatch 404 ^\/((?!\.well\-known\/).*)$ to the apache conf file without any success. I've tried pretty much everything I can think of. I even looked for any .htaccess files or any other .conf files loaded by apache that could be causing the folder to be blocked.

In essence how do I get the .well-known folder to be accessible from the subdomain of the main domain.

1
  • There is nothing wrong with the configuration. Have you checked permissions to ensure apache has access to that path (all directories down to the last one)? Directories need the executable flag on them as well as read. Files need read. User/group must allow apache that access (whatever user apache runs as apache/httpd/www/whatever). You do not want the redirect rule. With the folders and config apache should just serve the html file. Aside from permission all I can think of is a slightly misspelled directory or file name or apache wasn’t restarted after config change. Commented Jun 20 at 18:15

0

You must log in to answer this question.

Browse other questions tagged .