Forbidden You don't have permission to access / on this server after setup https in local wampserver
Posted by: dacia jap (41.249.49.---)
Date: January 11, 2014 10:43AM

I have set my local wampserver to https by following this tutorial

and now all is done and I can access php files with https:/ /localhost/......

but when I want to access files from other device in the same local network with the ip adress (I have got from ipconfig )192.168.1.46

I have this error

Forbidden

You don't have permission to access / on this server.


how can I fix this issue



Edited 2 time(s). Last edit at 01/11/2014 10:44AM by dacia jap.

Options: ReplyQuote
Re: Forbidden You don't have permission to access / on this server after setup https in local wampserver
Posted by: RiggsFolly (---.as13285.net)
Date: January 13, 2014 11:43AM

Hi dacia,

WAMPServer is by default setup to only be accessed from the PC that is running WAMP. Its a security feature for beginners so they dont get hacked.

If you want to allow access from other PC's inside your local network you have to add that instruction to the Apache config, dont worry its quite easy.

1. Edit your Apache config file ( httpd.conf )
Using the Wampmanager menus ( the W icon that sits in your system tray when WAMP is started ) do,
wampmanager -> Apache -> httpd.conf
This will open the correct httpd.conf file in notepad.

2. Find this section of parameters in that file and chnage it to look like the following.
The new piece is this line
    Allow from 192.168.1


<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
    # [httpd.apache.org]
    # 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.
    #

#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1 ::1 localhost 
    Allow from 192.168.1
</Directory>

If you are using Apache 2.4.x then this is the way it should look

<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
    # [httpd.apache.org]
    # 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.
    #

#   onlineoffline tag - don't remove
    Require local 
    Require ip 192.168.1
</Directory>

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.