Click to See Complete Forum and Search --> : Apache VirtualHost question


duckie
08-13-2001, 11:16 AM
Hey all. I've had a problem the past few days. I'm running a server at home that's running Apache with 2 VirtualHosts. Since I'm on a cable modem connection, and my cable company likes to switch my IP every now and then, I signed up with DHS.org's Dynamic DNS service for a while. I then found DynDNS.org, and the ddclient program that could be run as a daemon on my server, so every time my IP gets switched, the new IP could be automatically updated at DynDNS. I had no problem at all accessing the pages with the "dyn.dhs.org" address, but since I've switched to DynDNS a few days ago, and made the updates to my httpd.conf (which pretty much involved changing "dyn.dhs.org" to "dyndns.org" in the VirtualHosts), I haven't been able to access either of the 2 sites. The messed up part is that I can get to them from IE on my own computer at home (which is on the internal network), and through lynx on my server, but they can't be accessed from anywhere else. I'm not too sure what I screwed up on to not have the pages be accessible from the outside world, since I didn't change anything different in httpd.conf. If anyone can help me with this weird lil problem (PLEASE don't say just reboot, I'm up to 128 days of uptime and am really proud of that ;D), I'd greatly appreciate it, especially since I'd like to just go and purchase a domain name to use and I don't want it to be all screwy (which, btw, does anyone have any recommendations / warnings about which registrar to use?).

yogee
08-13-2001, 02:23 PM
I have that problem too. Nobody can get anything at my ip even though i can localy. I even flushed my firewall and still i can but outside cant.

May i ask why did you switch dns? Im only familiar with dyndns.


EDIT:
Oh i see the answer to my question there in your post. Your on cable and need the update agent. I will need to also do the same after i just get the basic vhost working right.


Thanks for you help in my post. I left more info as to what happened.

I just had a thought. Maybe port 80 has been closed suddenly by our service providers. Im getting a basic scan to see what 80 says and getting someone outside to hit me with https://


I just had another thought, went with it and noticed you arent to far away from me here in CT. You wouldn't happen to have OOL would you? Just currious couse i know alot of NY'ers do. You have icq#?

[ 13 August 2001: Message edited by: yogee ]

duckie
08-13-2001, 02:37 PM
I switched to dyndns.org for 2 reasons..

1. While looking up all kinds of dynamic DNS info, and looking to register my site with a registrar and how I could possibly do it without a static IP, I came across a program called ddclient. It's a daemon, and when your IP changes, it automatically logs into dyndns.org (or a couple of other Dynamic DNS sites, like ZoneEdit), and updates your IP for you, so there's less work involved every time your IP changes. The program doesn't work on DHS.org though, so I signed up at dyndns.

2. Not as important though, but annoying nonetheless, DHS.org kinda has some popups every now and then when you're logged in, and if it's not popups, it's IE telling me that "there's both secure and insecure data on this site and blah blah blah.." which is just the damn banner ad they have on the page, and it's all really freakin annoying when you're just trying to update an IP address in there that would normally take no more than 30 seconds. OK it's out of my system now..

But anyways..maybe it's a problem with dyndns themselves? Though I have no clue at all how it could be that. I might try reverting my httpd.conf back to DHS, just to see if it works. If it does, then screw it, I'm just gonna leave it alone and ditch dyndns.org. I'll post another reply if it's that.

yogee
08-13-2001, 03:20 PM
where you specify (NameVirtualHost MY.REAL.IP), do you use your real public ip for that? I have my server behind a linksys router so it should still be my real ip?

NOTE: I editted my last reply here as you replied also.

duckie
08-13-2001, 03:43 PM
Yes, as I only have one IP. My server is connected to my cable modem with eth0 (the public IP), and eth1 (the internal 192.* IP) connects to a hub, which connects the internal network together. Unfortunately, that was part of the problem with my IP being changed: I still have to go into httpd.conf and change that NameVirtualHost. There is a * (wildcard) you could put in the NameVitualHost spot, but I haven't gotten that to work yet (see Apache name-based Virtual Hosts (http://httpd.apache.org/docs/vhosts/name-based.html)). I'm not too sure which IP you would use if you have a router though. Sorry I can't be of more help there.

As for the rest of the problems, I just got back a free Nessus scan from vulnerabilities.org (http://www.vulnerabilities.org), and there's no port 80 open, so they say (I should have known too, as I've had Apache running all weekend, and the Code Red attacks had stopped last Thursday for some reason..grr). I guess it means the stupid cable company shut down my port 80, which right now looks like the main cause of all my problems. I'll find a way to contact them if I can. Dammit...

duckie
08-13-2001, 04:24 PM
OK I'm done here..it is the cable company shutting down my port 80 that's the problem..I just re-configured Apache to make my page serve on port 8080, and it works like a charm..goddamned Code Red, goddamned Microsoft, goddamned IIS..making my life hell..anyways, the whole Slashdot story is here (http://slashdot.org/article.pl?sid=01/08/09/0323208&mode=thread).

mattn
08-13-2001, 05:38 PM
check out http://www.dslwebserver.com/main/sbs-webserver-on-a-different-port-number.html

for a port 80 work around! :)

Craig McPherson
08-29-2001, 02:10 AM
Here's how the wildcard you mentioned works:

NameVirtualHost *:80

<Virtualhost *:80>
ServerName server1.com
ServerAlias *.server1.com
DocumentRoot /var/www/server1
</VirtualHost>

<Virtualhost *:80>
ServerName server2.com
ServerAlias *.server2.com
DocumentRoot /var/www/server2
</VirtualHost>