Enabling Apache For Local Area Networks

Apache logo
Here's a quick tip on how to enable Apache for local area networks.

I have a local wireless area network running in my house and one of my machines has a WAMP development stack. On this machine, I like to keep several blogs, content management systems, and test beds.

However, I can't access any of these websites if I am in another part of the house. This is a real pain when I may have a great idea and want to jot down a post in my blog. Here's how I solved it.

Note: Although this tip is in regard to a WAMP server setup, you should be able to take this idea and use it for any local area network.

Fire up your text editor and look for the httpd.conf file sitting in c:\wamp\bin\apache\Apache\conf\httpd.conf. Scroll down until you see the directory definition for the root:

<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
</Directory>

C:/wamp/www/ is the root of your web server where your virtual hosts exist. What I like to do is create internal websites like so:

C:\
   \wamp
      \www
         \myDrupal7.com
         \myWordpress.com
         \myJournal.com

Suppose the Apache server (your windows desktop) is sitting on 192.168.1.2. You will be able to access the Apache WampServer home page by typing http://192.168.1.2 into your browser.

To do so, change your httpd.conf to this:

<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Allow,Deny
    Allow from 127.0.0.1       #localhost
    Allow from 192.168.1.2   #the start of your local area network
</Directory>

This allows your local area network devices starting from 192.168.1.2, to access your Apache server. Now you can sit in the hot tub with your Android tablet accessing your local Wordpress blog!

WAMP local area network

If you are a LAMP fanatic, you can purchase a small Shuttle barebone kit and use it as a server. Add 4GB DDR3 RAM, a SATA 2.5" hard drive, Ubuntu server for free and there you go!

ASO ad


Filed under: