WAMP works perfectly on localhost, but need help w/ Outside World
Posted by: ClearFocus (---.dhcp.insightbb.com)
Date: April 09, 2012 09:25PM

Hello,

I've been using WAMP to develop in WordPress now for a few months and have had very good luck with it. A great program!

However, I attempted to setup the Virtual Hosts so my websites can be viewed on other computers on my LAN but also to the outside world. I followed the guide/instructions at this blog: [guides.jlbn.net]. However, never was able to get it to work. So, I set everything back ...

Here is how I'm setup:


My local hosts file:

127.0.0.1 localhost
127.0.0.1 wp-cn.com
127.0.0.1 wp-bhp.com


My httpd-vhosts.conf file:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName coffeenews
DocumentRoot C:/wamp/www/WP-CN
ErrorLog "C:/wamp/www/logs/error.log"
CustomLog "C:/wamp/www/logs/access.log" common
</VirtualHost>

<VirtualHost *:80>
ServerName bhp
DocumentRoot C:/wamp/www/WP-BHP
ErrorLog "C:/wamp/www/logs/error.log"
CustomLog "C:/wamp/www/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>

Hardware Router Firewall
Set Port 80 open via TCP to my internal IP address

Software Firewall
Added rule to allow incoming only to port 80

The HOST file on my laptop on my LAN:
192.168.1.4 localhost
192.168.1.4 wp-cn.com
192.168.1.4 wp-bhp.com

Any help is appreciated.

thanks,
Brian

Options: ReplyQuote
Re: WAMP works perfectly on localhost, but need help w/ Outside World
Posted by: RiggsFolly (---.as13285.net)
Date: April 10, 2012 09:35PM

------------------------------------------------------------------------------------------------
On your SERVER MACHINE
------------------------------------------------------------------------------------------------
HOSTS FILE:
127.0.0.1 localhost
127.0.0.1 coffeenews.localhost
127.0.0.1 bhp.localhost



httpd-vhosts.conf file:

NameVirtualHost *:80
## must be first so the the wamp menu page loads
<VirtualHost *:80>
ServerAdmin webmaster@.localhost
DocumentRoot "D:/wamp/www"
ServerName localhost
ServerAlias localhost
</VirtualHost>

## This lets you access this site from the SERVER MACHINE as coffeenews.localhost
<VirtualHost *:80>
ServerName coffeenews.localhost
DocumentRoot C:/wamp/www/WP-CN
ErrorLog "C:/wamp/www/logs/coffeenews_error.log"
CustomLog "C:/wamp/www/logs/coffeenews_access.log" common
</VirtualHost>

## This lets you access this site from the SERVER MACHINE as bhp.localhost
<VirtualHost *:80>
ServerName bhp.localhost
DocumentRoot C:/wamp/www/WP-BHP
ErrorLog "C:/wamp/www/logs/bhp_error.log"
CustomLog "C:/wamp/www/logs/bhp_access.log" common
</VirtualHost>

## This lets you access this site from any CLIENT MACHINE on your network as coffeenews.networkhost
<VirtualHost *:80>
ServerName coffeenews.networkhost
DocumentRoot C:/wamp/www/WP-CN
ErrorLog "C:/wamp/www/logs/coffeenews_error.log"
CustomLog "C:/wamp/www/logs/coffeenews_access.log" common
</VirtualHost>

## This lets you access this site from any CLIENT MACHINE on your network as bhp.networkhost
<VirtualHost *:80>
ServerName bhp.networkhost
DocumentRoot C:/wamp/www/WP-BHP
ErrorLog "C:/wamp/www/logs/bhp_error.log"
CustomLog "C:/wamp/www/logs/bhp_access.log" common
</VirtualHost>

##
# Now lets assume you have gone to dyndns.com and setup a dynamicip address for each of your sites
# called:
# coffeenews.webhop.org
# and
# bhp.webhop.org
# and installed the DynUpdater application supplied by them on the SERVER MACHINE
##

## This lets you access this site from any PC on the Internet as coffeenews.webhop.org
<VirtualHost *:80>
ServerName coffeenews.dyndns.org
DocumentRoot C:/wamp/www/WP-CN
ErrorLog "C:/wamp/www/logs/coffeenews_error.log"
CustomLog "C:/wamp/www/logs/coffeenews_access.log" common
</VirtualHost>

## This lets you access this site from any PC on the Internet as bhp.dyndns.org
<VirtualHost *:80>
ServerName bhp.dyndns.org
DocumentRoot C:/wamp/www/WP-BHP
ErrorLog "C:/wamp/www/logs/bhp_error.log"
CustomLog "C:/wamp/www/logs/bhp_access.log" common
</VirtualHost>

------------------------------------------------------------------------------------------------


This next section should be done to all the CLIENT PC's on your internal network that you want to see your
websites on the server machine.
It tells the Client where to find the website.
------------------------------------------------------------------------------------------------
On every CLIENT PC in your network
------------------------------------------------------------------------------------------------
1. always leave localhost as 127.0.0.1
2. lets assume you have a fixed ip address setup for your SERVER MACHINE as 192.168.1.4

The HOSTS FILE.
127.0.0.1 localhost
192.168.1.4 coffeenews.networkhost.com
192.168.1.4 bhp.networkhost.com



------------------------------------------------------------------------------------------------
If you want the server to be visible from the internet and / or your network then of course you
need to wampmanager -> Put Online so that apache will allow access, otherwise it only allows access
from 127.0.0.1


Also the name networkhost is just my idea of a self descriptive name and could be anything that works
for your brain, its not a special name its just one I think is good.

DYNDNS.COM, I believe they let you have 2 names for free so this will allow others on the internet to
get to your server machine using a real name rather than having to remember an ip address.

Options: ReplyQuote
Re: WAMP works perfectly on localhost, but need help w/ Outside World
Posted by: ClearFocus (---.dhcp.insightbb.com)
Date: April 11, 2012 03:14AM

Many thanks RiggsFolly! I'll attempt to get all this setup as you recommended on Wed and let you know how it goes. Again, many thanks!

Brian



Edited 1 time(s). Last edit at 04/11/2012 03:14AM by ClearFocus.

Options: ReplyQuote
Re: WAMP works perfectly on localhost, but need help w/ Outside World
Posted by: korndeang (203.189.130.---)
Date: June 27, 2012 06:57AM

I have try the following still no luck any missing for me help check.
-
++++++++++++++++++++Start++++++++++++++++++++

HOSTS FILE:
127.0.0.1 localhost
127.0.0.1 dev.localhost



httpd-vhosts.conf file:

NameVirtualHost *:80
# #must be first so the the wamp menu page loads
<VirtualHost *:80>
ServerAdmin webmaster@.localhost
DocumentRoot "D:/wamp/www"
ServerName localhost
ServerAlias localhost
</VirtualHost>

## This lets you access this site from any CLIENT MACHINE on your network as dev.192.168.27.170
<VirtualHost *:80>
ServerName dev.192.168.27.170
DocumentRoot C:/wamp/www/dev
ErrorLog "C:/wamp/www/logs/dev_error.log"
CustomLog "C:/wamp/www/logs/dev_access.log" common
</VirtualHost>


++++++++++++++++++++++End this step++++++++++++++++++++++

and i skip:
++++++++++++++++++++ Skip this from this++++++++++++++++++++
##
# Now lets assume you have gone to dyndns.com and setup a dynamicip address for each of your sites
# called:
# coffeenews.webhop.org
# and
# bhp.webhop.org
# and installed the DynUpdater application supplied by them on the SERVER MACHINE
##

## This lets you access this site from any PC on the Internet as coffeenews.webhop.org
<VirtualHost *:80>
ServerName coffeenews.dyndns.org
DocumentRoot C:/wamp/www/WP-CN
ErrorLog "C:/wamp/www/logs/coffeenews_error.log"
CustomLog "C:/wamp/www/logs/coffeenews_access.log" common
</VirtualHost>

## This lets you access this site from any PC on the Internet as bhp.dyndns.org
<VirtualHost *:80>
ServerName bhp.dyndns.org
DocumentRoot C:/wamp/www/WP-BHP
ErrorLog "C:/wamp/www/logs/bhp_error.log"
CustomLog "C:/wamp/www/logs/bhp_access.log" common
</VirtualHost>
+++++++++++++++++++++++++++++++++++++++++++++++++++++


I am successful access : [dev.localhost] or [dev.192.168.27.170] on server machine only(my server machine IP fix: 192.168.27.170 it is on virtual machine).
But other PC the same LAND i can't e.g. PC IP 192.168.27.164 I open browser firefox type: [dev.192.168.27.170] i will get message from browser "Server not found Firefox can't find the server at dev.192.168.27.170"


Please help me, i spend alot of time work on that still no luck. Does i have any mistake?

Options: ReplyQuote


Sorry, only registered users may post in this forum.