New VirtualHost Configuration

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
NewYork23
Forum Newbie
Posts: 1
Joined: Sun Apr 15, 2007 10:41 am

New VirtualHost Configuration

Post by NewYork23 »

Hello,

I recently tried to configure a new virtual host on apache (I have xampp).

Code: Select all

<VirtualHost *:80>
  DocumentRoot "C:/Program Files/xampp/htdocs"
  ServerName localhost
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot C:/seophp/
  ServerName seophp.example.com
  <Directory C:/seophp/>
     Options Indexes FollowSymLinks
	 AllowOverride All
	 Allow from all
  </Directory>
 </VirtualHost>

I made sure that

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

wasn't commented out. But now even though my original http://localhost:8080/ applications served from my htdocs directory works, when I navigate to http://seophp.example.com/info.php, it gives me the option to download a file...

What did I screw up in the configuration? I did restart my machine.

Thanks for any help, I'm a total novice....
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Make sure the NameVirtualHosts line is uncommented.
NameVirtualHost *:80
Anytime you modify the apache conf files you need only restart apache. No need to restart you machine.

;)
Post Reply