Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Can't find virtual hosts |
|
Author |
|
guitmanjo
Joined: 25 Sep 2008 Posts: 4
|
Posted: Thu 25 Sep '08 5:04 Post subject: Can't find virtual hosts |
|
|
I'm having troubles accessing my local webserver from a remote PC and am stuck on putting things right.
2 PC's (Primary w/ XP MediaCenter, Remote w/ XP Home) Apache 2.0.59, PHP 5.1.6 (WAMPserver installation) on the primary PC which acts as both network server & webserver. I've had this basic setup running for most of 2 years without much of a hitch ... till now.
My router reassigned IP addresses recently following a power outage. I reset my addresses for all my virtual servers in my httpd.cfg file & hosts file on my primary PC and can see loclhost & all my virtual servers on that PC via IE & FF. All is good here and my webserver appears to be working properly.
I have reset the IP addresses in my hosts file on my remote PC too, which is all I've had to do in the past to restore connection when addresses were reset. Unfortunately, I get a Cannot find Server error page for both localhost & any of my virtual hosts. Normally I'd think this was either a firewall issue or I just mis-typed something, but I've tested w/ all firewalls disabled and have checked & rechecked all my settings many times. It's been a while since I've had to do this so I may be forgetting something, but I can't see why it isn't working.
My network works fine, I can access all files via windows from my remote PC. I can ping the primary PC from the remote PC, no problem. I can ping localhost, no problem. My remote PC appears to be seeing everything, just failing to connect to apache.
I hard-coded my 2 pc's ip addresses / subnet / gateway & dns server in windows recently to avoid this issue happening again if I lose power, etc. (I know, I need a UPS). I've tested several ip addresses in case there may have been an address conflict of some sort, but that didn't change anything.
Any ideas? This has plagued me for more than 2 months, and I'm at the limits of my knowledge. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 25 Sep '08 5:32 Post subject: |
|
|
Is this remote pc in another location, eg. physically have a different street address, or just another pc in the house?
Either way I'd still triple check the host file on the remote.
You've learned that static LAN ip on the server is just about a must. |
|
Back to top |
|
guitmanjo
Joined: 25 Sep 2008 Posts: 4
|
Posted: Thu 25 Sep '08 5:36 Post subject: |
|
|
Just in the next room.
I'll look at the hosts file again tomorrow with fresh eyes.
Thanks, appreciate the inpt. |
|
Back to top |
|
guitmanjo
Joined: 25 Sep 2008 Posts: 4
|
Posted: Thu 25 Sep '08 13:11 Post subject: |
|
|
Stripped my hosts file on the remote pc down to bare bones, localhost only. Still no go.
It's probably something really obvious, but I just can't see it. I'm really baffled. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 25 Sep '08 17:20 Post subject: |
|
|
guitmanjo wrote: | Stripped my hosts file on the remote pc down to bare bones, localhost only. Still no go. |
probably not, since localhost is just that .. that machine alone.
A test .. from remote, can you http://the-lan-ip-of-the-server
Say server's LAN IP is 192.168.1.10
Remote's is 192.168.1.11
from remote, http://192.168.0.10 should find it.
If not, either the windows firewall IS most likely getting in the way, or you've just haven't got the IP right.
Fresh pair of eyes always helps when problems occur .. of course, how many of us will put something down when we want it working now .. probably none. |
|
Back to top |
|
guitmanjo
Joined: 25 Sep 2008 Posts: 4
|
Posted: Fri 26 Sep '08 0:04 Post subject: Woohoo! |
|
|
Success! (In around about way) BIG Thanks.
Quote: | If not, either the windows firewall IS most likely getting in the way, or you've just haven't got the IP right. |
That's exactly what I've been thinking since my first attempt, it just had to be either the firewall or a misconfigured hosts file, but till now I haven't been able to make it work. This is why I've been beating my head against the wall on and off for 2 months, it just had to be ... and it was BTW, lol.
I had a whole long response about my testing ready to post when I discovered the problem, glad now I didn't make you read thru it.
I confirmed windows firewall was still off once again via control panel, and shut down my Comodo Firewall as I had been in all past attempts. This is where the problem was. I have been shutting the Comodo firewall down from the icon in the system tray, it even asked me if I wanted to shut down the firewall and I always replied yes. I just realized I haven't gotten a windows warning that my computer may be at risk after shutting Comodo down. So I went to the security Center via Control panel and there it was ... plain as day. The Comodo Firewall wasn't in fact off, apparently all I've been doing was shutting down the icon (doh!). I was certain it was something stupid I was overlooking, and, well ...! I'll have to dig into it and see how to change permissions so everything works properly.
Anyway, I'm seeing the webserver via http://host-pc-ip-address now. I'm sure I can get my virtual hosts set back up now that I'm over that hump.
Quote: | probably not, since localhost is just that .. that machine alone. | My mistake, I should have known that. I assumed IF I was connecting to apache, then localhost would be the webserver. I've been thinking I could look at http://localhost via the browser on my remote PC, but I'm probably remembering incorrectly, I understand why it wouldn't be possible.
I really appreciate all the help you've offered. You confirmed my suspicions, and your definitive answer made me look further into the firewall issue. This really makes my day! |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 26 Sep '08 5:46 Post subject: |
|
|
Good, and thank you for coming back and posting what the solution was ... that keeps it from simply hanging out there on a limb.
Gregg |
|
Back to top |
|
|
|
|
|
|