How to configure apache for remote access on Windows?

I have installed Apache locally on Windows XP and want to access it from another PC on the SAME network but connection is refused and can’t figure out how to edit conf file (searched on web but didn’t find any good answer).

Nobody can help ?

Thanks.

WMM,

On the assumption that you’re using a (named) VirtualHost and included it in your hosts file as 127.0.0.1 localdomainname, you will have to go to the other computers on your network and do the same - EXCEPT replacing 127.0.0.1 with the LAN address of your computer, i.e., 192.168.0.1. Obviously, this will only work while that is your LAN address but you should be able to assign a permanent IP within your LAN to keep it going.

Regards,

DK

Are you able to provide some more info on how you have your two client PC’s setup.
E.g
each PC has a static IP,
the PC’s can ping each other
you tested that the PC with apache installed can infact load http://localhost with out any error.

If you are trying to edit the .conf file from the second PC, you need to double check that file sharing is enabled and the apache dir is shared with the appropriate security premisisons. Editing the .conf can be done with notepad.

Yes they have static IP. In fact I can access it with Oracle express http server whereas I can with the Uniform Server ( http://hubpages.com/hub/Uniform_Server ) which uses Apache config such as this:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

# Allow remote server configuration reports, with the URL of
#  http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".your-domain.com" to match your domain to enable.

<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

Do I really need a virtual host ? I just want to use the IP adress but thanks I will try what you said though I’m not sure to have understood everything I’m really not a network geek :(.

wmm,

To provide access through YOUR Apache server, your setup must include your IP Address (in hosts) and your firewall must be opened for external access to port 80. Use of your IP Address by others on your LAN should be sufficient to access Apache.

BTW, local VirtualHost configurations are a godsend when you’re dealing with more than a single local domain.

Regards,

DK

That’s all I want: access from LAN only. But when I add Allow from xxx.xxx.xxx.xxx (address of my server) to Apach .conf it doesn’t work even from the browser which resides on the server; I don’t understand why :frowning:

<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from xxx.xxx.xxx.xxx
Allow from 127.0.0.1
</Location>

# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".your-domain.com" to match your domain to enable.

<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from xxx.xxx.xxx.xxx
Allow from 127.0.0.1
</Location>

wmm,

IMHO, the problem may be that you’re being too specific with your IP Address, i.e., xxx.xxx.xxx.xxx need only be xxx.xxx.xxx to allow everyone on your LAN to access the server. This is necessary in the hosts file, too, where you’ll need both 127.0.0.1 and your LAN address sent to the same VirtualHost name and, to use your LAN’s VirtualHost name, the other hosts files will need to be changed to let those computers know where to find mydomain (NOT mydomain.com) on the LAN.

Regards,

DK

Hello, thanks for your answer.

I want to access the server with IP address so I don’t need to change host file.

Also I should mention that on the same server I have also an Oracle Express http server and I can access it from another LAN PC by typing the IP adress without any problem; so I can’t see why It wouldn’t work the same way with the Apache http Server. So It must come from the .conf file no ?

wmm,

It must come from the .conf file, yes!

However, with TWO http servers, my first question is “which one has been assigned port 80?” Since they cannot both be using port 80, that will cause a problem.

Regards,

DK

I don’t use port 80 for the second one either so it cannot be due to the port number :slight_smile:

wmm,

Are both servers running (Run | services.msc and go through the list)? If Oracle is also operating, it’s likely receiving the request instead of Apache.

Regards,

DK

Happy New Year :slight_smile:

Yes but why should there be any problem since it’s not on the same port: locally I can access to both why not remotely ?

Thanks.

wmm,

HOW does your OS know which server to contact with a port 80 request - internally OR externally? Play “pick a port” and go for it - and let your hosts file know which is which (as well as httpd.conf’s VirtualHost section).

Regards,

DK