403 Forbidden!
Posted by: jkjames6 (---.100.90.146.dyn.plus.net)
Date: November 11, 2013 09:51PM

Hello!
I have been searching for about 2 hours straight to try and fix the 403 forbidden.
I can access it via localhost and it's green and online.
I am using a dns from noip.com it connects but just says
Forbidden

You don't have permission to access / on this server.
I have changed all the require all denied to require all granted.
I used to run on windows XP the old version of apache 2.2 i believe now i run 2.4 and all the settings have changed!
I run windows 7 64 bit i5 16 GB Ram
Please help!
james

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: RiggsFolly (---.as13285.net)
Date: November 12, 2013 12:57AM

Are you testing from inside your router or outside?

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: jkjames6 (---.100.90.146.dyn.plus.net)
Date: November 12, 2013 07:40PM

Inside but am using an DNS

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: November 13, 2013 12:40AM

Most home routers dont have the 'loopback' feature required to use a dns from inside the router.

Try testing it from a neighbours house

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: jkjames6 (---.255.208.46.dyn.plus.net)
Date: November 13, 2013 08:17PM

I have. Same thing though :/

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: RiggsFolly (---.as13285.net)
Date: November 14, 2013 12:04PM

Send me a private message with you httpd.conf in.

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: RiggsFolly (---.as13285.net)
Date: November 14, 2013 10:37PM

Ok, read your httpd.conf

Start by putting it all back the way it was after the install.

Then read and digest the Sticky thread on this forum [forum.wampserver.com]

The most obvious problem with your config are

In this section <Directory "c:/wamp/www/">
You have

Require local

Which means only allow access from this machine.
It should be

Require all granted

The other problems are:
<Directory />
AllowOverride none
Require all granted
</Directory>

This lets anybody access the whole drive that Apache is installed on A BAD IDEA.

It should be
<Directory />
AllowOverride none
Require all denied
</Directory>


If you are Listening on 8080, its a good idea to change
'ServerName localhost:80'
to
'ServerName localhost:8080'

If you are using a dynamic dns domain name it would also be a good idea to tell Apache to answer to that name

'ServerName xxxx.noip.com:8080' or whatever name you picked from their list

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: jkjames6 (---.255.208.46.dyn.plus.net)
Date: November 15, 2013 05:05PM

You are sooo helpful 3>
Ill change it later and get back to you winking smiley

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: jkjames6 (---.114.90.146.dyn.plus.net)
Date: November 20, 2013 04:40PM

Thanks!
Works.

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: jojanonone (---.bredband.comhem.se)
Date: November 20, 2013 04:59PM

RiggsFolly Wrote:
-------------------------------------------------------
> Then read and digest the Sticky thread on this
> forum
> [forum.wampserver.com]

This guide has a flaw. In the section where change httpd.conf from
# Require all granted
# Onlineoffline tag - do not remove
     Order Deny, Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from :: 1
     Allow from localhost
with
# Onlineoffline tag - do not remove
    Require local
We have a capital O in Onlineoffline. But in the instructions for the script onlineOffline.php the tag is written as onlineoffline. The script uses str_replace() which is case sensitive and you will not get your server online.

Be consistent Onlineoffline OR onlineoffline, don't mix.

Also - when editing the script onlineOffline.php the guide tells you to change to
$OnlineText = "# onlineoffline tag - do not remove
    Require all granted";

$OfflineText = "# onlineoffline tag - do not remove
    Require local";

Be care of case! The variable used in the script is $onlineText and $offlineText. If you just copy and paste the script will not work. Variables are case sensitive as well.

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: Otomatic (Moderator)
Date: November 20, 2013 06:00PM

Hi,

In the French original guide : [forum.wampserver.com] there is no mistake about the case. winking smiley

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: RiggsFolly (---.as13285.net)
Date: November 20, 2013 07:05PM

Hello jojanonone,

Thank you so very much for taking time to point out the errors I inadvertantly added to the original document.
I have corrected them and asked Oto to delete the old document and Sticky the new one.

I hope to see you hanging out on this site more often in the future to provide others with assistance.
Its a mainly thankless and always unpaid task, but then we didn't pay for the software did we, so its nice to give something back in some way.

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: Otomatic (Moderator)
Date: November 20, 2013 07:33PM

Hi,
My previous post was just a little wink. Despite my age (I saw the D-Day), I'm still teasing. winking smiley
Be old is to be young longer! smiling smiley

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: jkjames6 (---.114.90.146.dyn.plus.net)
Date: November 23, 2013 03:34PM

Hello again...
I now have a new problem!
It's all online but wcbans.sytes.net
Isnt working.
Pictures: [imgur.com]
Help!
Thanks

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: RiggsFolly (---.as13285.net)
Date: November 23, 2013 11:16PM

Did you port forward 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: 403 Forbidden!
Posted by: jkjames6 (---.114.90.146.dyn.plus.net)
Date: November 24, 2013 12:40PM

Yes I have and using my ip address of a standard dns host with :8080 works but this doesn't.

Options: ReplyQuote
Re: 403 Forbidden!
Posted by: RiggsFolly (---.as13285.net)
Date: November 25, 2013 11:55AM

Have you tried using that domain name from outside your router?

Most home routers dont have the required feature ( loopback ) to let you use its own WAN ip from inside your network.

---------------------------------------------------------------------------------------------
(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!
Posted by: jkjames6 (---.114.90.146.dyn.plus.net)
Date: November 27, 2013 04:22PM

Ill try that.

Options: ReplyQuote


Sorry, only registered users may post in this forum.