Solved

How do I access local sites thru Apache server from my internally networked laptop

Posted on 2009-04-02
6
285 Views
Last Modified: 2012-05-06
My Apache 2 server is installed on a W2K machine and is set up to listen at port 8080.  I've been using it for months and works fine when accessing local sites on that machine.  I now would like to access the same sites from a networked machine that is using a wireless connection.  This new machine is a laptop running XP.  

I am able to access the server itself, i.e. I can get to Apache's "test" page.  And I can run php files from the Apache root directory.  But I can't serve up the sites -- these sites are served up fine when I access them from the machine on which the Apache server is installed.  Therefore, the virtual hosts are properly set up for use within that machine.

So, I can get to the Apache server, but cannot access any virtual hosts.  It just can't make that final leap.  I've tried numerous things all to no avail.  My gut says it's something simple, but I'm stuck.

Help would be greatly appreciated.  Thanks,

Margaret
0
Comment
Question by:mhugos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
darrickhartman earned 250 total points
ID: 24056289
If you are using named virtual hosts, you will need to configure your internal DNS server to direct those named requests to the IP address of your W2K machine.

So for example, if you have www.foo.com and www.bar.com as two sites on your W2K server, your DNS server would need to have an entry for each of those two domains to point to the IP address of your W2K server.
0
 

Author Comment

by:mhugos
ID: 24062460
Thank you for getting back with your suggestion.  I tried updating DNS server but with no success (see below for details.)

Here's some more info on how my machines are set up:
W2K machine:
-- Hosts file associates sites to 127.0.0.1
-- Apache 2 Server: httpd.conf contains virtual server definitiions.  Here is one of my virtual server definitions:  
########################################### cuc:8080 #########################
<VirtualHost 127.0.0.1:8080>
    ServerName cuc
    DocumentRoot "E:/Eclipse Workspace/drupal"
    Alias /phpmyadmin       "E:/Program Files/phpMyAdmin"
    <Directory "E:/Program Files/phpMyAdmin">
      Options None
      AllowOverride None
      Order allow,deny
      Allow from 127.0.0.1
    </Directory>
    <Directory "E:/Eclipse Workspace/drupal">
      AllowOverride All
      Order Deny,Allow
      Deny from All
      Allow from 127.0.0.1
      Allow from 192.168.1.1
      Allow from 192.168.1.2
      Allow from 192.168.1.6
    </Directory>
    CustomLog logs\cuc-access.log common
    ErrorLog logs\cuc-error.log
</VirtualHost>

On the XP machine:
Host file has "cuc" associated with 192.168.1.2 (the W2K mahine)

On my W2K machine, entering "http://cuc:8080" in a browser takes me to the site (also located on W2K)
On my XP laptop, entering "http://cuc:8080" takes me to the root of the apache server, but I can't get any further.

I updated the DNS server with an entry for "cuc" pointing to W2K's IP address (192.168.1.2).  It did not change anything, tho.  I tried pointing it to localhost (127.0.0.1) but also to no avail.  Since I also have IIS on the W2K, I've told Apache server to listen on port 8080.  Therefore, I append my site names with ":8080".

I've set things up to work okay locally on W2K PC, but perhaps not for networked machines??

Let me know if you need any other info.  Thank you so much for your help.




 
0
 
LVL 7

Assisted Solution

by:darrickhartman
darrickhartman earned 250 total points
ID: 24062488
You cannot set up the VirtualHost container to have 127.0.0.1.  You can use a wildcard * instead.

<Virtualhost *:8080>

This will use the ServerName to determine how to serve the correct page.
0
 

Author Comment

by:mhugos
ID: 24062965
Awesome!
That was it.  A million thanks.
0
 
LVL 10

Expert Comment

by:oliverpolden
ID: 24442627
Accept his answer then!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
What You Need to Know when Searching for a Webhost Provider
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question