I am trying to get Apache work and here is my configuration:

System32/hosts:

127.0.0.1   localhost
127.0.0.1   rss.local

httpd-vhosts.conf

NameVirtualHost *:80


<Virtualhost *:80>
 ServerName rss.local
 DocumentRoot C:\Users\Jansu\workspace\rss

 SetEnv APPLICATION_ENV "development"

 <Directory C:\Users\Jansu\workspace\rss>
  DirectoryIndex index.php
  AllowOverride All
  Order allow,deny
  Allow from all
 </Directory>
</VirtualHost>

when i go to rss.local with browser , I am gettings message IT WORKS!, which is the default message for Apache.

But my C:\Users\Jansu\workspace\rss\index.php is:

<?php
    echo phpinfo(); 
?>

How can I get it to work? Any suggetions?

Feel free to ask more info.

link|improve this question
did you restarted apache after edit the config? – Flask Sep 25 '11 at 11:52
feedback

migrated from stackoverflow.com Sep 25 '11 at 12:05

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 2 down vote accepted

Open C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf in a text editor. If you're using XAMPP, the file is located at C:\xampp\apache\conf\httpd.conf. Scroll down to the Supplemental configuration section at the end, and remove the # from the second line so the section now looks like this (around line 460):

#Virtual hosts 
Include conf/extra/httpd-vhosts.conf

Save httpd.conf and restart the Apache service.

PS: I assume you have a working PHP installation. If not check this website: http://www.thesitewizard.com/php/install-php-5-apache-windows.shtml

PS2: Are you using XAMPP or did you manually install Apache on your computer?

link|improve this answer
feedback

Are you sure the httpd-vhosts.conf is loaded in the httpd.conf? What does the error.log display?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.