Link to home
Start Free TrialLog in
Avatar of learnitlists
learnitlists

asked on

Apache Error when using AllowOverride All

Hi,

I am trying to get CakePHP on subdomains working on Aptana Cloud.

I have edited httpd.conf and added a VirtualHost (see code below). This all seems to work but I am getting an error when accessing php. From searching I have found that the solution is to change AllowOverride from None to All, I have done this but now every time I visit the site I get a dialog asking me if I want to download the php file. If I change it back to None then the files load but with a php error.

Any ideas what is wrong with it?

Thanks

Mike
<VirtualHost *:80>
DocumentRoot /path/to/files
ServerName subdomain.mydomain.com
<Directory /path/to/files>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of learnitlists
learnitlists

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of karlwilbur
karlwilbur

Awesome that you solved the problem. You might want to post a little more detail as to exactly how the legacy AddHandler directive was triping you up. This will help others that may have a similar issue.

Also, FWIW, I try to avoid "AllowOverride All" if at all possible. I explicitly allow only what is needed in the htaccess file.
E.G.
For ModRewrite:
    AllowOverride FileInfo

For Basic Authentication:
    AllowOverride AuthConfig

For Throttling:
    AllowOverride Limit