Update Broke Vhosts Setup
Posted by: snowman53 (---.170.1.189.dsl.dyn.telnor.net)
Date: December 22, 2009 11:31PM

I updated from WAMP 2.0 to 2.0i and broke the vhosts setup. Wamp was started and on-line after all changes.

Pinging the domain name from server shows 192.168.1.xx (serverIP). Pinging from external shows Web router IP & E-mail server is working so DNS appears to be OK.

But can not access the domains from the server nor from external computers. Can access by directly opening index.htm file from browser.

Have emptied the browser cache.

I would appreciate suggestions on how to find my mistake.

Thanks!


Here is what I have done (repeated several times to ensure the mistake was repeatable!)

1) Copied original wamp directory to wamp.bak

2) Installed wamp 2.0i

3) Edited C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf to enable vhosts:
......
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
......

4) Copied original www directory to new Wamp directory.

5) Copied original httpd-vhosts.conf to C:\wamp\bin\apache\Apache2.2.11\conf\extra\
It looks like this:

<VirtualHost *:80>
ServerName www.domain_1.com
ServerAlias domain_1.com domain_1_dir
DocumentRoot C:/wamp/www/domain_1_dir
ErrorLog C:/wamp/www/domain_1_dir/logs/error.log
CustomLog C:/wamp/www/domain_1_dir/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName www.domain_2
ServerAlias domain_2 domain_2_dir
DocumentRoot C:/wamp/www/domain_2_dir
ErrorLog C:/wamp/www/domain_2_dir/logs/error.log
CustomLog C:/wamp/www/domain_2_dir/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
#ServerName localhost
#DocumentRoot C:/wamp/www
#ErrorLog C:/wamp/www/logs/error.log
#CustomLog C:/wamp/www/logs/access.log common
#</VirtualHost>

6) Verified hosts file exists and has:
127.0.0.1 localhost
127.0.0.1 www.domain_1.com
127.0.0.1 www.domain_2.com

Options: ReplyQuote
Re: Update Broke Vhosts Setup
Posted by: yfastud (Moderator)
Date: December 23, 2009 01:39AM


Options: ReplyQuote
Re: Update Broke Vhosts Setup
Posted by: snowman53 (---.170.1.189.dsl.dyn.telnor.net)
Date: December 23, 2009 01:43AM

Tried restarting Wamp server and restarting computer.

No difference.

Thanks!

Options: ReplyQuote
Re: Update Broke Vhosts Setup
Posted by: yfastud (Moderator)
Date: December 23, 2009 04:55PM

is that all contents of your vhosts file? if yes, you need to have this line on top of that file and restart wamp

NameVirtualHost *:80

Have fun,

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

Options: ReplyQuote
Re: Update Broke Vhosts Setup
Posted by: snowman53 (---.170.1.189.dsl.dyn.telnor.net)
Date: December 23, 2009 09:48PM

Interesting - that line was missing from my old vhosts file, which worked.

But unfortunately adding it to the file still did not make it work. (restarted computer after changes).

Frustrating.....

Thanks for the help!

Options: ReplyQuote
Re: Update Broke Vhosts Setup
Posted by: toumimi (---.adslgp.cegetel.net)
Date: December 24, 2009 02:51AM

Hum. I suggest you to comment the "include vhosts file" in Apache configuration, to get a working environment.
Then, you download my patch and install testApacheConfFile component.
Then you would be able to test Apache configuration and it would point to you which line does not work (file and line number).

Ask me if you have any problem.

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote
Re: Update Broke Vhosts Setup
Posted by: snowman53 (---.170.1.189.dsl.dyn.telnor.net)
Date: December 24, 2009 09:43PM

Well I cleaned everything off the HD and reinstalled again. Probably the 6th or 7th install, but it worked this time!

Thanks for the help.

I finally figured out what was happening. There was a minor typo in the vhost file. Must have introduced it by accident at some point.

The strange thing was that it killed all the sites, not just the one with the typo or the ones that followed.



Edited 1 time(s). Last edit at 12/26/2009 06:23AM by snowman53.

Options: ReplyQuote


Sorry, only registered users may post in this forum.