Solved

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

Posted on 2009-04-02
6
282 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
  • 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 9

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now