Sign in with
Sign up | Sign in
Your question

Setting up a Home Live Dev Server Using WAMP

Last response: in Networking
Share
March 21, 2013 4:25:34 PM

I currently use WAMP on my local network for sites still in the development phase. I would like to utilize a sub-domain (dev.mydomain.com) to point to my WAMP installation. Basically, I would like dev.mydomain.com to be a public site where people I'm helping out can access their sites while they are in the development phase.

I added an A-Record for the subdomain through GoDaddy so dev.mydomain.com points to my router's IP address; however, I'm unsure how to forward requests for that domain to the WAMP installation. I know I need to forward a port on my router (I'm using DD-WRT as my firmware) but am not sure how to do that. I've used port forwarding before but am not sure how to set it up for a web server inside the router.

So my main questions are:
- Should I forward Port 80 to the local IP of my PC running WAMP? Can I use another port besides 80?
- How do I configure WAMP to use my subdomain (dev.mydomain.com) opposed to the default localhost?

Thanks in advance for any help! And I'm happy to give out any additional info if more information is needed. Thanks again
March 21, 2013 8:58:34 PM

Generally you will do a port forward of port 80 to you local WAMP server.
Port Forwarding instructions are here http://www.dd-wrt.com/wiki/index.php/Port_Forwarding


If you configure WAMP to host the site on a different internal port, e.g. 81, then your router will need to forward port 80 incoming at the router to port 81 on the WAMP host. This will be hidden from the outside world which will think that you are only on port 80.

If you only run the one site, then just make it the default site, and callit what you will.
If you run multiple sites, then you'll need to setup virtual hosts, which instructs the webserver to interrogate the FQDN in the request when determining which site to display. Multiple sites can all be on port 80 on the same server if you configure virtual hosts.


m
0
l
March 26, 2013 8:46:08 PM

Thanks for the helpful reply. For now I'm only going to use one site, so I went ahead and just set it up for one site. I went into the httpd.conf file and changed the following line:

ServerName dev.mydomain.com:80

This was all I changed and I can access the site remotely without a problem; however, from any device in my network, the site times out when I try to connect to it. Any ideas why this would be? If I run a trace route from inside the network, it shows that its connecting to my WAN IP without a problem. But it won't connect to the site.

Do you have any ideas on how I could solve this so the domain resolves internally? Thanks again for all the help!

poweruser_24 said:
Generally you will do a port forward of port 80 to you local WAMP server.
Port Forwarding instructions are here http://www.dd-wrt.com/wiki/index.php/Port_Forwarding


If you configure WAMP to host the site on a different internal port, e.g. 81, then your router will need to forward port 80 incoming at the router to port 81 on the WAMP host. This will be hidden from the outside world which will think that you are only on port 80.

If you only run the one site, then just make it the default site, and callit what you will.
If you run multiple sites, then you'll need to setup virtual hosts, which instructs the webserver to interrogate the FQDN in the request when determining which site to display. Multiple sites can all be on port 80 on the same server if you configure virtual hosts.




m
0
l
April 9, 2013 7:12:29 AM

It's generally a case of trying to force your internal network to recognise the domain name as internal rather than external, or at least not go to the external IP to then come back internal - this generally fails as the normal SIP firewalls on home routers see this as a hack attack, because it is unseemly to ask the big wide world of the internet about something that it shouldn't know about (like the internals of your network).

Normally you would manage this via an internal name server record along with a roxy server. If you aren't running a name server and are instead relying on a cable/adsl/other router for this (which will probably be deferring to your ISP), you may be able to add an entry to the dns table for the router (pretty unlikely though).

Other options are, you can add the domain to the list of suffixes to your TCP properties for your network card. Or the real easy cheat method is to put a redirect in your host file to the local IP for the domain name (this is probably the easiest method). This way anytime you use the domain name, it will end up refering to IP address you enter in the host file.

It is fairly normal practice for the internal address to a website be different to the external address when hosted in the way you are doing due to name server lookup.
m
0
l
!