0

Does anybody know how to view a locally hosted site on Wamp on an iPad or iPhone? Ive managed to open the command prompt and found out my IP address, 192.168.1.18. I then typed this address in my browser on my iPad but I got the error "forbidden".

How can I get it to work?

halfer
  • 19,824
  • 17
  • 99
  • 186
PK333
  • 147
  • 1
  • 3
  • 13

1 Answers1

2

Try this

Edit your httpd.conf file, and look for this section

<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 None

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

Now change this to Allow access from your ip

#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1 localhost 
    Allow from 192.168.1

Note I only used the first 3 of the 4 parts of the ip addres, this will allow access from any ip address in the range 192.168.1.0 to 192.168.1.255. This is because your ipad will get different ipaddress's allocated to it depending on how many other devices you may have attached at any one time.

If you are using WAMPServr 2.4 and therefore Apache 2.4.x the syntax is a little different, you should us

Require local
Require ip 192.168.1 

The Require local covers 127.0.0.1 localhost and also the IPV6 localhost equivalent ::1.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149