1

I have an Apache httpd setup where I'm trying to only allow html and ico files off of the DocumentRoot folder. However I'm finding with the config I've pasted in below that Apache is giving me a 403 if I use the URL app1.example.com saying that "You don't have permission to access / on this server." However if I type app1.example.com/index.html I get the page as expected. I figured the override for indexs would have covered this but it doesn't appear to be.

In my httpd.conf I have the default deny in place:

# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#Default
<Directory />
  AllowOverride none
  Require all denied
</Directory>

Then for my virtualhost entry I have:

<VirtualHost *:443>    
  ServerName app1.example.com

  <Directory />
    <FilesMatch ".+\.(html|ico)$">
    Require all granted
    </FilesMatch>
    DirectoryIndex index.html
    AllowOverride Indexes
  </Directory>


DocumentRoot D:\MyApp1
Alias /app1 D:\MyApp1
JkMount  /app1/* worker10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.