Swimminginthought

A place for all things technical and my mind..

Menu
  • About Me / Hire Me
Menu

Apache can’t serve the .well-known directory

Posted on August 27, 2019August 27, 2019 by Percy Kwong

In an effort to set up SSL validation for this domain, I decided to use the Hash Validation technique.  Needless to say, it’s never as straight-forwards as you want.  Apache doesn’t like to serve the .well-known directory as it gives a “permission denied” error. A simple and easy fix is to alias it in the vHosts file.

just add the following (and of course modify it accordingly) to your vhosts config and of course issue a restart of Apache.

Alias /.well-known/pki-validation/ /var/www/my.web.root/.well-known/pki-validation/ 

<Directory /var/www/my.web.root/.well-known/pki-validation/> 

AllowOverride None 

Require all granted 

Satisfy Any 

</Directory>

 

This will of course solve the issue as it will point the alias of the requested URI to a hard-coded path on the server. Remember to delete the alias once you’re done validating.

Just a bit of *nix magic for those of you who are perpetually annoyed.

If  you’re looking for an Architect / Solution provider, consider hiring me.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Kubernetes install gotcha on CentOS-7.x
  • Infrastructure as Code using AWS Cloudformation
  • Does SSL matter? It does and it’s not just web encryption.
  • Apache can’t serve the .well-known directory
  • Cloudy with a chance of Meatballs
  • Resurrection of the Blog
  • Encryption type Matters with Deep Packet Inspection – solved
  • Completely off topic.. Just a personal note.
©2025 Swimminginthought | Built using WordPress and Responsive Blogily theme by Superb