|
Posted by J.O. Aho on 02/19/06 14:02
CuppaJava wrote:
> Hi,
>
> I am trying to configure an Apache 2.0 and PHP setup using a virtualhost. The problem appears that PHP is setup ok for Apache but my doc root is not responding to my attempts to view a PHP page. Apache /server-info reports PHP as a mime type and I get no errors so I am guessing it is ok.
>
> Here is my virtualhost:
> <VirtualHost *:80>
> DocumentRoot c:/projects/crm/web/
> ServerName crm.localhost
> ServerAlias crm.localhost
> ServerAdmin me@localhost.com
> ErrorLog logs/crm_error.log
> CustomLog logs/crm_access.log common
> DirectoryIndex index.php index.html
> </VirtualHost>
>
> The php.ini docroot is:
> doc_root = c:\projects\crm\web
>
> So is there another way to configure the document root? Is there a way to test if PHP is working at all since I cant get a page to display?
When using virtual hosts, you must make all hosts, even the default one into a
virtual hosts. You see to things that is needed for all servers to be defined
outside the virtual hosts sections, eg loading the PHP module, directory
indexing, ...
You don't use any server naming options outside the virtual hosts sections.
This will not affect your problem, but you don't use ServerAlias for the name
you used for ServerName.
//Aho
[Back to original message]
|