In httpd I have a main domain and sub domain like so;
<VirtualHost main:8080>
ServerName main
DocumentRoot "/Users/admin/Sites/main"
<Directory /Users/admin/Sites/main>
#AllowOverride FileInfo Limit Options Indexes
Options FollowSymLinks Indexes MultiViews
AllowOverride All AuthConfig
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost sub.main:8080>
ServerName sub.main
DocumentRoot "/Users/admin/Sites/main/sub"
<Directory /Users/admin/Sites/main/sub>
#AllowOverride FileInfo Limit Options Indexes
Options FollowSymLinks Indexes MultiViews
AllowOverride All AuthConfig
Order allow,deny
Allow from all
</Directory>
A dead simple .htaccess file is in both the main folder and sub folder with
RewriteEngine on
However, going to http://sub.main:8080 gives a 500 error. Server error log gives
[alert] [client 127.0.0.1] /Users/admin/Sites/main/.htaccess: RewriteEngine not allowed here
Deleting main's htaccess removes the error. How can I set it so that htaccess files exist in both folders?