PDA

View Full Version : Fixing my apache.conf for includes


rchurch
06-21-2005, 07:42 AM
I transferred a website from a personal machine to my Plesk VPS, and have realized that the <? include('xxxx.inc') ?> sequences are not working. It appears that they are not being passed on for php processing. They actually show up when I view the source in a browser.

The pages are .html files and the php includes are used to insert other content into them. They worked a bit when I changed the extension of the files from .html to .html.php

It seems that the apache configuration in Plesk is not setup to do the php including. I suspect that what I did on a whole server basis has to be done on a virtual host basis only, as users of the other domains may not want that functionality.

I cannot tell for the life of me what should be changed in the apache configuration for the virtual host. I always took it for granted.

Is there a way to get Apache to treat html files as php files? I could use that as a temporary fix.

danweber
06-21-2005, 08:51 AM
Did you enable PHP in your hosting setup?

Go to your domain config and go into "Setup", in the hosting section. There you will see the option "PHP Support", make sure it is checked.

Dan

rchurch
06-21-2005, 11:30 AM
I had to add AddType application/x-httpd-php .inc into the vhost.conf for that domain.

I believe it can also be done in .htaccess files