|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (5 bit)
Join Date: Aug 2004
Posts: 25
|
I've been searching everywhere (and continue to do so) but figured I might post in the meantime in case anyone can help.
I'm running AMP on Windows XP (Apache 2.2.8, MySQL 5.0 and PHP 5.2.6). Everything is up and running fine, but I am having trouble getting this vhost to work. I've searched out numerous setup tutorials, but they pretty much say the same thing. I am setting up multiple domains on one IP. First, I uncommented "Include conf/extra/httpd-vhosts.conf" in my httpd.conf. Then I added two of my sites to my hosts file in C:\WINDOWS\system32\drivers\etc. I added under 127.0.0.1 localhost: 127.0.0.1 sv.site1 127.0.0.1 sv.site2 I then went to my httpd-vhosts.conf file. I made sure my "NameVirtualHost *:80" was uncommented and added: HTML Code:
<Directory /> Order Deny,Allow Allow from all </Directory> HTML Code:
<VirtualHost *:80> ServerName localhost DocumentRoot C:/SERV/www </VirtualHost> <VirtualHost *:80> ServerName sv.site1 DocumentRoot C:/SERV/vhosts/site1 </VirtualHost> <VirtualHost *:80> ServerName sv.site2 DocumentRoot C:/SERV/vhosts/site2 </VirtualHost> C:\SERV C:\SERV\www (localhost directory) C:\SERV\vhosts (my site directories) C:\SERV\vhosts\site1 C:\SERV\vhosts\site2 I have tried with my vhosts directory in my www as well as out. I have tried changing my vhosts to include the entire path and truncated paths. I have tried this and variations of this configuration as shown on one tutorial: HTML Code:
<VirtualHost *:80> ServerName sv.site1 DocumentRoot C:/SERV/vhosts/site1 <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory C:/SERV/vhosts/site1> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> My problem is that when I access any of my sites locally or via domain url, it defaults to the first virtual host entry in the vhost file. Site1 and Site 2 both show my index page in my localhost directory. If I comment out my localhost, they both default to site1, etc. Thanks in advance. -- Well, I found the answer quick enough to disregard this post entirely, but I guess someone might find it useful as I've seen others with the same issue. I figured out that I was missing my ServerAlias, i.e.: HTML Code:
<VirtualHost *:80> ServerName sv.site1 DocumentRoot C:/SERV/vhosts/site1 ServerAlias site1.com </VirtualHost> I guess this just turned into another tutorial.
Last edited by dektek11; 05-12-2008 at 10:13 PM. Reason: Issue resolved |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| XP Setup Problems. | FabianH | Windows Legacy Support (XP and earlier) | 8 | 12-02-2006 06:13 PM |
| A problem in BIOS setup? | ITlover | Windows Legacy Support (XP and earlier) | 10 | 10-04-2006 09:28 AM |
| re installing "my comp" or "win explorer" | stuartey | Windows Legacy Support (XP and earlier) | 8 | 04-27-2003 02:18 PM |
| New Build Setup Problems | Manofmusic | Computer Hardware | 4 | 12-11-2002 09:05 AM |
| W2K install Setup Prob. | Frederick | Windows Legacy Support (XP and earlier) | 2 | 03-06-2002 12:47 PM |