I upgraded my Ubuntu to 14.04 LTS and Apache to 2.4. When the server first started back up I was getting 403 errors visiting pages. This is when I learned I needed to change to Require all granted
. I thought I had everything working till I realized .htaccess
was not being loaded anywhere. I thought that needed to be changed as well, but the Apache docs says it's fine from what I can find. Below is my Directory
rule currently.
VirtualDocumentRoot /var/hosts/%-2.0.%-1.0/%-3+/public_html
<DirectoryMatch "^/var/hosts/[^/]+/[^/]+/public_html">
Options FollowSymLinks
AllowOverride All
Require all granted
</DirectoryMatch>
My first thought was the regex was wrong and none of the rules were being loaded. So I commented out the Require all granted
and saw it stopped websites from loading again. So I knew it was loading them. I had to do the below to get them to work.
<Directory /var/hosts/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Am I ok to leave it with this? Any thoughts why it isn't working?