0

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.

Jaanus
  • 103
  • 4

2 Answers2

4

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

Flask
  • 141
  • 2
2

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?

George Tasioulis
  • 1,969
  • 2
  • 16
  • 17