Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

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

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

    
did you restarted apache after edit the config? –  Flask Sep 25 '11 at 11:52
add comment

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?

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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