Virtual Names
Posted by: deliverme (---.otenet.gr)
Date: May 11, 2006 12:06AM

Hi,
I am having a problem with the Virtual names deal in the httpd.conf

I have 2 folders. The www where is has my site and the www2 that has my original version...So far when i want to test something i rename the folder www2 to www and change the other one to something else in order to preview it.
I read the posts here in the forum that i can have a home.local and testsite.local option in my Wamp server...
So far i tried to do this by reading the posts but the Apache server would not start.The MYSQL was running though...
Please someone can help me out here? I 've been trying for 2 hours now with any possible combination.

So far i have this at the end of the file:

NameVirtualHost *:80

#
#### localhost ####
#

<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot C:/wamp/www
ServerName home.local
ErrorLog C:/wamp/apache2/logs/error.log
CustomLog C:/wamp/apache2/logs/access.log common
<Directory "C:/wamp/www">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Include "c:/wamp/apache2/conf/alias/phpmyadmin.conf"
</VirtualHost>

#
#### localhost2 ####
#

<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot C:/wamp/www2
ServerName test.local
ErrorLog C:/wamp/apache2/logs/error.log
CustomLog C:/wamp/apache2/logs/access.log common
<Directory "C:/wamp/www2">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Include "c:/wamp/apache2/conf/alias/phpmyadmin.conf"
</VirtualHost>


Thanks
-mario


________________ edited ___________________

Ok i manage to get the WAMP server going by doing this

NameVirtualHost *:80
#
#### localhost ####
#
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot C:/wamp/www
ServerName home.local
</VirtualHost>

#
#### localhost2 ####
#
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot C:/wamp/www2
ServerName test.local
</VirtualHost>

But it totaly ignores me....only the [localhost] works and nothing else...
What am i doing wrong ?



Post Edited (05-11-06 00:23)

Options: ReplyQuote
Re: Virtual Names
Posted by: yfastud (72.236.169.---)
Date: May 11, 2006 10:13PM

Hi,

I'm a newbie just like you, but practice with wamp for a while, so here is the simple way, put both www1 and www2 in www, then do as follows:

NameVirtualHost *

<VirtualHost *>
ServerName www1
DocumentRoot C:/wamp/www/www1
</VirtualHost>

<VirtualHost *>
ServerName www2
DocumentRoot C:/wamp/www/www2
</VirtualHost>

Replace C: with your correct letter.

Hope this help and have fun,

Or like to see it in action, check here:

[testsite.jlbn.com]

[4leaf.jlbn.com]



Post Edited (05-11-06 22:20)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Virtual Names
Posted by: deliverme (---.otenet.gr)
Date: May 11, 2006 11:37PM

thanks for your reply....i did do what you said but still no luck
i am running the sites localy on my computer there is no internet sites..
i name them as
home.local
test.local
will it work like this ?
The funny thing is that even after your settings and restarting Wamp my site still shows at [localhost] oO
How is that possible?
I am sure its the right file. I even tried to edit httpd.default.conf but still nothing.
I got no idea what am i doing wrong sad smiley

Options: ReplyQuote
Re: Virtual Names
Posted by: yfastud (---.234.141.247.Dial1.Miami1.Level3.net)
Date: May 13, 2006 05:59AM

Sorry, I didn't see your edited code when I posted my first, and I don't think anything wrong with your edited code, so my best guess that your problem is no DNS to route your path as expected.

Right now Yahoo Business have domain promotion for $3/year up to 5 years. Only spend $15 for 5 years, then practice anyway you like is what I'm doing now and so far I have all web server using WAMP, ftp server, mail server, and phpBB forum smoothly run.

Hope this help and have fun,

BN

Ps, If you did as my suggestion from my first post here, did you try [localhost] or [localhost] yet? If not, try it, then post back here.

Options: ReplyQuote
Re: Virtual Names
Posted by: deliverme (---.otenet.gr)
Date: May 13, 2006 03:09PM

I did it !!!!
In the httpd.conf i put this:


NameVirtualHost *:80

#
#### localhost ####
#

<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot C:/wamp/www/www1
ServerName home.local
</VirtualHost>

#
#### localhost2 ####
#

<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot C:/wamp/www/www2
ServerName test.local
</VirtualHost>


AND in the hosts file under windows/system32/drivers/etc

i put this:
127.0.0.1 test.local
127.0.0.1 home.local

Hehehe, thanks for the help one smiling smiley

Options: ReplyQuote


Sorry, only registered users may post in this forum.