PHP won't interpret files placed in an arbitrary directory
Posted: Wed Jul 16, 2008 6:03 am
Hi
I've got my website folder in "My documents" folder and I'm trying to set up Apache to run the php files there through the php interpreter.
It all works fine when I put my website folder into c:\www\vhosts\localhost, but that's not what I want.
So that's what I did:
I created the my_website.conf file in C:\www\Apache22\conf\extra\vhosts\localhost
It contains:
Now, this file is included from within C:\www\Apache22\conf\extra\httpd-vhosts.conf, which contains this bit:
However, when I go to localhost/my_website in my browser, I see the raw content of the index.php file that is inside of the "my_website" folder. This means that the website folder is found and accessible but it's not going through the php interpreter at this occasion.
My php set-up works otherwise. .. and yes I did restart apache
Any advice would be appreciated
Cheers!
Michael
I've got my website folder in "My documents" folder and I'm trying to set up Apache to run the php files there through the php interpreter.
It all works fine when I put my website folder into c:\www\vhosts\localhost, but that's not what I want.
So that's what I did:
I created the my_website.conf file in C:\www\Apache22\conf\extra\vhosts\localhost
It contains:
Code: Select all
Alias /my_website "C:\Documents and Settings\I\My Documents\my_website"
<Directory "C:\Documents and Settings\I\My Documents\my_website">
Options All
AllowOverride All
order allow,deny
allow from all
</Directory>
Code: Select all
<VirtualHost *:80>
DocumentRoot /www/vhosts/localhost/
ServerName localhost
Include conf/extra/vhosts/localhost/*.conf # <----------- The bit that counts
</VirtualHost>
My php set-up works otherwise. .. and yes I did restart apache
Any advice would be appreciated
Cheers!
Michael