Error code 403 forbidden local
Posted by: Vinc420 (80.67.175.---)
Date: May 12, 2016 10:11PM

Hi everyone,

I have installed my Wamp version 3.0.4 in the afternoon, so it's brand new, and I can't access it from other devices than the computer it is on. I would like to allow access from devices on the local network. I have tried different solutions in the httpd.conf with no effect, so I came back to its previous settings.

I haven't been able to find any solution working. My firewall is totally disabled so that it can't be the cause of the problem, and my server is online and accessible typing both localhost or its local ip address in the url bar.

I have only one virtual host which is the localhost.

I have noticed that I didn't run the installer as administrator.

If any of you have a solution for me, I'd be grateful !

Thanks in advance, and sorry if I'm just missing something stupid smiling smiley



Edited 3 time(s). Last edit at 05/12/2016 10:31PM by Vinc420.

Options: ReplyQuote
Re: Error code 403 forbidden local
Posted by: RiggsFolly (Moderator)
Date: May 12, 2016 11:17PM

Then if you are not an adminitrator account uninstall WAMPServer, delete \wamp\* and then reinstall properly as an administrator.

---------------------------------------------------------------------------------------------
(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
Re: Error code 403 forbidden local
Posted by: Vinc420 (80.67.175.---)
Date: May 13, 2016 12:00AM

I have done everything as administrator this time and the problem remains sad smiley thanks for your answer!



Edited 1 time(s). Last edit at 05/13/2016 12:01AM by Vinc420.

Options: ReplyQuote
Re: Error code 403 forbidden local
Posted by: RiggsFolly (Moderator)
Date: May 13, 2016 10:39AM

Hi

WAMPServer is configured as a single seat developer tool.

However you can easily allow access to Apache using one of these methods

1. Using the wampmanager menus do:

To Activate the Online / Offline menu

- right click wampmanager -> Wamp Settings -> Menu Items : Online / Offline
Wait a moment for the Icon to go Orange and then Green again
This time it has a slightly different Green icon with a red dot in it!

- left click wampmanager -> Put Online

This can be reverses by
- left click wampmanager -> Put Offline
Wait a few moments for the icon to go Orange and then Green again

Remember this is just changing the Apache's config to allow access from any IP Address in the universe.



2. If you want to be a littel more specific about who can access Apache
- Set WAMPServer/Apache is Offline

- left click wampmanager -> Apache -> httpd.conf
This will open the file in notepad

Find this section of the httpd.conf file
#   onlineoffline tag - don't remove
    Require local

And add the ip address's you want to allow access to

either specific ip addresses
#   onlineoffline tag - don't remove
    Require local

    Require ip 192.168.0.10
    Require ip 192.168.0.11

Or the whole subnet i.e. any ip inside your router
#   onlineoffline tag - don't remove
    Require local

    Require ip 192.168.0

this assumes you are on subnet 192.168.0, yours maybe different, check first

---------------------------------------------------------------------------------------------
(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
Re: Error code 403 forbidden local
Posted by: Vinc420 (80.67.175.---)
Date: May 13, 2016 11:56AM

I had already tried these changes in httpd.conf, with no effect.

I was hoping your put online solution would work, but it didn't. Is it normal that my wamp icon is a green w on a yellow background with the red dot at the top ?

It says server online, every services launched.



Edited 1 time(s). Last edit at 05/13/2016 11:56AM by Vinc420.

Options: ReplyQuote
Re: Error code 403 forbidden local
Posted by: RiggsFolly (Moderator)
Date: May 13, 2016 12:00PM

Hi

The icon with the red dot is what is shown when you have done the the Put Online

How exactly are you trying to access your site from another PC?

What other changes have you made to the Apache config?

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



Edited 3 time(s). Last edit at 05/13/2016 12:03PM by RiggsFolly.

Options: ReplyQuote
Re: Error code 403 forbidden local
Posted by: Vinc420 (80.67.175.---)
Date: May 13, 2016 12:17PM

Hi smiling smiley

I haven't changed anything in this one since I completely reinstalled it.

I try to access my PC typing its local IP in the url, 192.168.1.150, from my phone which is on the same wifi.

Localhost and 192.168.1.150 both work from my computer.

Options: ReplyQuote
Re: Error code 403 forbidden local
Posted by: RiggsFolly (Moderator)
Date: May 13, 2016 12:29PM

OK,

So where is the code for the site stored? Like this `\wamp\www\test.php` or like this `\wamp\www\subfolder\test.php`

Also can you show me the section of httpd.conf that looks like this

DocumentRoot "c:/wamp/www"
<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:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride all

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

#   onlineoffline tag - don't remove
    Require local
</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
Re: Error code 403 forbidden local
Posted by: Vinc420 (80.67.175.---)
Date: May 13, 2016 12:37PM

There is no subfolder, actually I'm only trying to access the default index, so first option.

DocumentRoot "c:/wamp/www"
<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:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride all

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

#   onlineoffline tag - don't remove
    Require all granted
</Directory>


(By the way, how do you format your text like you did on the forum ?)

I have tried with antivirus and firewall disabled.



Edited 3 time(s). Last edit at 05/13/2016 02:12PM by RiggsFolly.

Options: ReplyQuote
Re: Error code 403 forbidden local
Posted by: RiggsFolly (Moderator)
Date: May 13, 2016 02:28PM

Code is formatted, and this is difficult to explain as if I use the right syntax you of course wont see it.

{code}

{/code}

but you use square brackets instead of curly brackets


Ahh I have just realised there has been a change I did not know about.

Look for this line in your httpd.conf file on line 512 approx

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

If the `Include` does not contain a `#` comment then you also need to edit the following file.

First set WAMPServer Offline

Then edit `\wamp\bin\apache\apache{version}\conf\extra\httpd-vhosts.conf`

It should look like this :

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot D:/wamp/www
	<Directory  "D:/wamp/www/">
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>

Amend it like this

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot D:/wamp/www
	<Directory  "D:/wamp/www/">
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Require local

                Require ip 192.168.1                                      <-- new line
	</Directory>
</VirtualHost>

Now you will be able to access the server from any IP address issued by your routers DHCP server i.e. any wired or WIFI'd connection to your router

---------------------------------------------------------------------------------------------
(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
Re: Error code 403 forbidden local
Posted by: Vinc420 (80.67.175.---)
Date: May 13, 2016 04:42PM

Ok thank you very much, problem solved ! Do I have to edit this part also for any future change, like allowing one external ip address, or only the previous section you asked me to show (into <directory>winking smiley ?



Edited 1 time(s). Last edit at 05/13/2016 04:46PM by Vinc420.

Options: ReplyQuote
Re: Error code 403 forbidden local
Posted by: RiggsFolly (Moderator)
Date: May 13, 2016 06:54PM

This bit

---------------------------------------------------------------------------------------------
(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
Re: Error code 403 forbidden local
Posted by: Vinc420 (80.67.175.---)
Date: May 14, 2016 07:07PM

Thank you ! smiling smiley

Options: ReplyQuote


Sorry, only registered users may post in this forum.