Opening local development web server to the public

  • Thread starter Deleted member 12930
  • Start date
D

Deleted member 12930

Guest
I have a local web development server that I'd like to open up so my clients can see the sites I build for them. The server is just my old laptop that I now use only as a web server.

I'm having trouble figuring out the port forwarding for this. I have a Netgear WGR614v9. I've configured the server to have a static IP, and have port forwarding sending port 80 over to the server. I've made an exception in Windows Firewall for port 80.

So, from my understanding, I should be able to go to my http://[my public ip], and I should in the least see my servers default site.

I think my problem is that I don't have just one website hosted by Apache. But instead am using Virtual Hosts to have a handful of sites hosted. So what I don't know is how to configure the server to know what site to serve.

I know I'm missing a step with having DNS setup. I haven't gone through that step yet because I thought it wasn't immediately necessary to configure the port forwarding.

Please help!

(sorry if this is better in the Webmastering & Programming forum)
 
Last edited by a moderator:
you need to point the domain name to your external IP or its not going to work, just ask them to setup test.websitename.com and point it to your external ip.
 
#1, depending on your ISP they may block port 80 and you'll need to use a non standard port. I'm assuming you have a home connection and not business service.
 
yes, except the vhost it listening for the domain name to so it can return the correct content

you could just setup the main host web dir to /var/www/whatever and then have subdirs in here or symlinks to the customer web dirs then just use http://external-ip/customername

i would at the least password protect them using htaccess or something and maybe disable directory listing so that you dont get people snooping around in the dev sites.
 
#1, depending on your ISP they may block port 80 and you'll need to use a non standard port. I'm assuming you have a home connection and not business service.

I have comcast. From what I can find online, they do not block port 80. Is there any service I could use to confirm this though?

yes, except the vhost it listening for the domain name to so it can return the correct content

you could just setup the main host web dir to /var/www/whatever and then have subdirs in here or symlinks to the customer web dirs then just use http://external-ip/customername

i would at the least password protect them using htaccess or something and maybe disable directory listing so that you dont get people snooping around in the dev sites.

That's not really an option for me. It would require I alter too much of my server than I like to. Especially in the middle of a time-sensitive project. Thanks though.

Also, I do have directory listing disabled, and my server isn't up 24/7. This is only to give clients a sneak peak really. I have a host I move the sites over to when they're ready for client approval and testing.

Nope, the vhosts look or the domain name.

I can't have the client setup a subdomain. But I did intend to put these sites under one of the few domains I own. What type of DNS record would I create for this? A, AAAA, MX, CNAME, TXT, SRV

Thanks!

Also, does anyone know the best way to start and trouble shoot this? I haven't tried looking into Apache's logs yet, but I'd like to figure out where in the process it's breaking.
 
Because if its under linux here is what you need to do if your running any ubuntu server:

you need to make a conf. file:
/etc/apache2/sites-available

<VirtualHost *:80>
ServerName domain.com
DocumentRoot /var/www/xxxxx/
</VirtualHost>

Now if you want to do subdomain you want to do it like this:

<VirtualHost *:80>
ServerName sub.domain.com
DocumentRoot /var/www/xxxxx/
</VirtualHost>


make that config file like this: domain.com.conf

then you want to do is ssh into the box and log in as your regular user then login to root then restart apache2 by doing /etc/init.d/apach2 restart

for as windows I dont know I really havent played round with it yet but I will soon.
 
It's a windows machine; and I've already configured vhosts.
 
if you have allready configured v hosts then you just need to create an A record pointing the domain name to the correct IP (must be the same as the domain name you setup in vhost.


so for eg, say this is the record for mydomain com add

Code:
www                     A       xxx.xxx.xxx.xxx
for www.mydomain.com
or
Code:
someting               A       xxx.xxx.xxx.xxx
for something.mydomain.com
 
who is your domain from like godaddy or what? like I said before you need your domain name be pointed at your ip address.

if its at godaddy you need to do it like this:

A (host)

@ your static IP or your ip address

then create cname is

www @ your static IP or your ip address.
sub @ your server name or ip address.
 
Back
Top