403 Forbidden error
Posted by: nick01 (---.cc.bas.bg)
Date: July 10, 2018 02:31PM

Hello,

I know this is a frequent question, but I followed a lot of the answers online and still get this error. I installed the latest version of WampServer (3.1.3 64-bit), put my test site and it worked on localhost, but when I put it online I get a 403 Forbidden. In the other answers it says to make a new Virtual Host, so I did.

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

#
<VirtualHost *:80>
    ServerName example.com
    DocumentRoot "c:/wamp64/www/example_com"
    <Directory  "c:/wamp64/www/example_com/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Still, I get 403 Forbidden error.



Edited 1 time(s). Last edit at 07/10/2018 03:30PM by RiggsFolly.

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: RiggsFolly (Moderator)
Date: July 10, 2018 02:38PM

Hi,

And how are you trying to access this site when you try connection from the internet

---------------------------------------------------------------------------------------------
(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: 403 Forbidden error
Posted by: nick01 (---.cc.bas.bg)
Date: July 10, 2018 02:39PM

By the name example.com (changed for security reasons of course).



Edited 1 time(s). Last edit at 07/10/2018 02:40PM by nick01.

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: RiggsFolly (Moderator)
Date: July 10, 2018 02:46PM

Hi

Do you have an index.php file in the c:/wamp64/www/example_com folder?

---------------------------------------------------------------------------------------------
(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: 403 Forbidden error
Posted by: RiggsFolly (Moderator)
Date: July 10, 2018 02:49PM

Also I suggest you check your port forwarding and also your Firewall

---------------------------------------------------------------------------------------------
(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: 403 Forbidden error
Posted by: nick01 (---.cc.bas.bg)
Date: July 10, 2018 02:57PM

Yes, I have an index.php.
The firewall initially didn't allow inbound traffic to pass, so I made rules for TCP and UDP.
Before that, when I typed the address, the browser just showed as if it started to load the page and just hung.
After that, it started displaying "403 Forbidden", which to me suggests that traffic is reaching the server and port forwarding works fine.

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: nick01 (---.cc.bas.bg)
Date: July 10, 2018 03:18PM

Also, if I do a "ping example.com" in cmd, it is successful.

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: RiggsFolly (Moderator)
Date: July 10, 2018 03:35PM

Have you checked the Apache Error log for any more clues?

---------------------------------------------------------------------------------------------
(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: 403 Forbidden error
Posted by: nick01 (---.cc.bas.bg)
Date: July 10, 2018 03:53PM

I checked it now, when I try to load the main page, two errors appear in the log (I've edited the domain name and IPs):

[Tue Jul 10 16:39:54.823519 2018] [authz_core:error] [pid 2088:tid 1016] [client <IP and port removed>] AH01630: client denied by server configuration: C:/wamp64/www/
[Tue Jul 10 16:39:54.870435 2018] [authz_core:error] [pid 2088:tid 1016] [client <IP and port removed>] AH01630: client denied by server configuration: C:/wamp64/www/favicon.ico, referer: [www.example.com]

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: RiggsFolly (Moderator)
Date: July 10, 2018 03:55PM

Did you activate and use the "Put Online" manu in wampmanager?

---------------------------------------------------------------------------------------------
(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: 403 Forbidden error
Posted by: nick01 (---.cc.bas.bg)
Date: July 10, 2018 04:04PM

Yes, in the beginning, before I learned about creating a new Virtual Host, I searched for the "Put Online/Offline" option, activated it and used it. It didn't do what I expected though, so I reverted it back (I think) by going to httpd.conf and editing it like this:

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

Then I made the new Virtual Host in httpd-vhosts.conf, as suggested (by you, I think) in several answers around the Internet.

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: RiggsFolly (Moderator)
Date: July 10, 2018 04:05PM

smiling smiley smiling smiley Its always my fault sad smiley sad smiley

---------------------------------------------------------------------------------------------
(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: 403 Forbidden error
Posted by: nick01 (---.cc.bas.bg)
Date: July 10, 2018 04:11PM

smiling smiley Didn't mean that at all, just remembered your name from there.
You did help a lot of people, but in my case it doesn't solve the problem.



Edited 1 time(s). Last edit at 07/10/2018 04:13PM by nick01.

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: RiggsFolly (Moderator)
Date: July 10, 2018 04:13PM

One more check!

Check that this line is uncommented in your httpd.conf file

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

the `Include` shoudl not have a `#` in front of it

---------------------------------------------------------------------------------------------
(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: 403 Forbidden error
Posted by: nick01 (---.cc.bas.bg)
Date: July 10, 2018 04:16PM

Yes, it is uncommented.

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: RiggsFolly (Moderator)
Date: July 10, 2018 04:21PM

then I am running out of ideas.

Would you like to try a Team Viewer session so I can see whats really happening?

---------------------------------------------------------------------------------------------
(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: 403 Forbidden error
Posted by: nick01 (---.iccs.bas.bg)
Date: July 10, 2018 04:50PM

Thanks, I'll look over the .conf files again very carefully and if I don't find anything, then we may try a TV session.

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: nick01 (---.cc.bas.bg)
Date: July 11, 2018 02:12PM

Hi, I check your PMs.

Options: ReplyQuote


Sorry, only registered users may post in this forum.