Apache DefaultType not working
"
and
"
I would simply like to add
"DefaultType application/x-httpd-php"
to the apache configuration to accomplish this.
However, I can't figure it out – i have already tried adding it to
-- httpd.conf
-- the virtual hosts (in sites-available, including to the file named "default")
-- the apache2.conf file
I have tried various combinations of the above.
I am using the recommended install of lamp per the linode guide.
Thanks in advance.
4 Replies
I'm assuming that you restarted apache after changing the vhost file and the apache2.conf file.
You can look at this link which offers two options:
You can make the changes in the link above (probably just one or the other) in your vhost file or an .htaccess file in the site's root directory. Using .htaccess doesn't require a restart to apache, though you'll need AllowOverride All in your vhost file for .htaccess to override setting in your vhost.
MSJ
I can't figure out why apache is reading my htaccess file since all of the "AllowOverride" I can find are set to " AllowOverride None". This is in /etc/apache2/sites-available/default and /etc/apache2/sites-available/default-ssl. I didn't try to override anywhere else (for example, no entry in the vhost/directory file for the site).
There is probably another file or reference I am missing, but I can't find it (I checked "/etc/apache2/apache2.conf", "/etc/apache2/httpd.conf", "/etc/apache2/conf.d/security").
It works, so I'm going with this solution – but, if you also happen to know where else to verify that the settings are ok (or at least that I know where they are) that would be appreciated.
Thanks.
The /etc/apache2/sites-available/default file is for the default site on the VPS. It's not the default settings for your sites. You probably have a file in sites-available with the name of your domain in it (eg, /etc/apache2/sites-available/yourdomainnamehere.com). That is the file that probably has AllowOverride All in it.
MSJ