1

I have a Windows XP machine where I have installed WAMP and made a PHP based web application. I can access the web application from within this machine by using the browser and pointing to: http://localhost/myApp/ --- and the page loads fine.

Now I want this site (http://localhost/myApp) to be accessible to all machines within the network (and may be later, to the general public as well). I am quite new to this, how do I make my site accessible to all machines within the network and to the general public in the internet?

I tried modifying the httpd.conf file in Apache (WAMP) by changing Listen 80 to Listen 10.10.10.10:80 (where I replaced 10.10.10.10 with the actual IP of this windows xp machine). I also tried "Put Online" feature in WAMP. None seem to work though.

How do I make it accessible?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
guest
  • 11
  • 1
  • 1
  • 2
  • 2
    [Don't do this.](http://serverfault.com/q/453617/126632) WampServer and its cousins are not designed or intended for production use. – Michael Hampton Jun 29 '13 at 15:49
  • @MichaelHampton - I am just trying out once. I intend to go the normal route (with pure Apache installation) once my site is fully done. I just want, for now, all my computers within the same network to access this test site. How do I enable that? – guest Jun 29 '13 at 15:56
  • OK.. figured it out. If you want other computers (within your network) to access your site hosted in your localhost, then: 1. go to httpd.conf (wamp - apache - httpd.conf) 2. search for "deny from" or "allow" 3. uncomment the line "deny from all" 4. add a new line "allow from all" 5. save httpd.conf file, and restart all services. To access your site, from another machine, type http://ipAddress/yourSiteAddress where ipAddress is the ipa address of your localhost machine (you can get this by doing a ifconfig - if in linux, or ipconfig from windows). hope that helps. – guest Jun 29 '13 at 16:25

1 Answers1

1

Actually a better solution is this:

For Apache 2.4.x

Find this section in the httpd.conf file, this change also corrects the syntax to use Apache 2.4 new syntax.

<Directory "c:/wamp/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
#    Require all granted
#   onlineoffline tag - don't remove
     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
</Directory>

And change it to

<Directory "c:/wamp/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #

    # This looks after 127.0.0.1 ::1 and localhost
    Require local
    # This should be the first 3 quartiles of the standard subnet ipaddress range
    Require ip 192.168.0
</Directory>

Or if you are still using Apache 2.2

Change the similiar section as follows

<Directory "d:/wamp/www/">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #

    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1 ::1 localhost 
    # This should be the first 3 quartiles of the standard subnet ipaddress range
    Allow from 192.168.0
</Directory>

If you use the Allow from all methos you are actually allowing access from any ip address, even external internet ones. Potentially very dangerous.

RiggsFolly
  • 111
  • 4