Making my PC as webserver, connected to LAN

October 6, 2009 at 20:57:40
Specs: Windows XP
hi guys,
I have installed apache on my system and it's
working fine .. but i also want that the
websites created my me .. should be
accessed by my classmates .. our all
systems are connected via LAN .. so can u
tell me :-
1. how to configure APACHE , for making my
websites to accessed by other systems which
are connected to LAN...

See More: Making my PC as webserver, connected to LAN

Report •

October 7, 2009 at 17:13:36
Set the server to listen on an IP (and maybe port number).

How do you access the server now? localhost?

Firewalls need to have exception also.

Playing to the angels
Les Paul (1915-2009)

Report •

October 9, 2009 at 08:25:54
can u help me :

how to set the server to listen on an IP and I am accessing my
server as localhost only ...

and what do u mean by firewalls need to have exceptions ?? :-(

Report •

October 9, 2009 at 13:04:45

In your hppd.conf file you you should have:

This means that the Apache web server is available on port 80 which is the default port for http://

You also need to include a line like:

The IP addrress is the IP address of the PC running the Apache web server.

If your IP address is dynamic (assigned by a DHCP server) then you have a problem because the address you give out to your friends will change from time to time.
You may be able to get the LAN administrator to assign you a fixed IP address.
(Look at the TCP/IP properties for your network card - if it says obtain an IP address automatically then you have a dynamic IP address that will change sometimes on boot up).

You can't use the typical because
(a) you don't have a domain name and
(b) there is likely no DNS server to provide the translation from the name to the variable IP address.
If you are on a larger LAN it is possible that there is a DNS server (such as BIND) - ask the LAN administrator.

If your IP address is fixed, then anyone on the LAN should be able to access your Apache web server.

Just ask them to enter or whatever your IP address is, in a browser.
You should also be able to access the server on your own PC with the same line instead of 'localhost'.

IP addresses over a LAN are 'private' and are not accessible over the internet.

You should also consider your security settings in Apache.

Without security settings anyone can access your web server pages, including folders that you may be using for page development etc. etc.
Apache comes with password management and there is lots of info. on this from the Apache project.

In httpd.conf you should also have:

<FilesMatch "^\.ht">
Order allow,deny
Deny from all

to prevent .htaccess and .htpasswd files from being viewed by Web clients.

.htaccess should be in the root of your Apache docs folder (default is htdocs).
the .htaccess file is plain text and includes the address of the password file, which should not be stored in the htdocs folder.

As to firewalls, you will have to look at the firewall you are using e.g., AVG or Norton and follow instructions for ports, and see if port 80 is open. Look for something like network protocols in the firewall section and then http protocol incoming. This varies a lot from product to product.


Report •

Related Solutions

October 31, 2009 at 02:53:59
thanks a lot for ur reply sir ...

- my ip address is a local ip address :-
-and i am trying to set apache to access .shtml files for ssi
but i am not able to do .. can to tell me how to do that ..

currently i am saving all my cgi scripts and .shtml files in My
documents -> MyWebsite folder... how to set access
privileges for this folder ..

Report •

Ask Question