Windows 8: You don't have permission to access / on this server.
Posted by: keljnr (---.as13285.net)
Date: February 07, 2013 11:40AM

Having a nightmare getting Wamp to work on Windows 8. Hope someone can help me.
1st I had to change ports from 80 to 8080. I now get the Green Tray Icon, but when I go to 'Localhost:8080' I get the following message:

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

The page has a title of '403 Forbidden'.

However, if I use '127.0.0.1:8080/' The WAMPSERVER homepage pops up. phpMyAdmin and other services work, but my projects won't appear.

If I type:
127.0.0.1:8080/MyProject
it redirects to:
127.0.0.1/MyProject

and I then get the following message in Google Chrome: Oops! This link appears to be broken.

Can anybody please help me out :-)

Options: ReplyQuote
Re: Windows 8: You don't have permission to access / on this server.
Posted by: RiggsFolly (---.as13285.net)
Date: February 07, 2013 11:58AM

First you need to work out what is capturing port 80 and uninstall it or re-configure it.

left click the wampmanager icon and follow the menus to:
wampmanager -> Apache -> Service -> Test port 80

That will open a command window and hopefully tell you what is using port 80.

If you cannot work out how to sort out whatever it is port info here and we will help

Options: ReplyQuote
Re: Windows 8: You don't have permission to access / on this server.
Posted by: keljnr (---.as13285.net)
Date: February 07, 2013 01:49PM

Thanks Riggs! I have managed to change to port 80 (Microsoft IIS had taken it).
I still have the problem with localhost:
Forbidden
You don't have permission to access / on this server.

Again, when I go to 127.0.0.1 Wamp Home appears but runs into problems with my files.

How can I have it so localhost works?

Cheers again :-)

Options: ReplyQuote
Re: Windows 8: You don't have permission to access / on this server.
Posted by: RiggsFolly (---.as13285.net)
Date: February 07, 2013 02:00PM

Right, Windows as of Windows7 comes with the ability to use the IPV4 network address range and the IPV6 network address range and by default they are both turned on.
IPV4 addresses look like this: 123.321.10.234
IPV6 addresses look like this: 2001:0db8:85a3:0042:1000:8a2e:0370:7334

The IPV4 address for localhost is 127.0.0.1
The IPV6 address for localhost is ::1


See
[en.wikipedia.org]
[en.wikipedia.org]
[en.wikipedia.org]


However, Wamp's security as of now ( Feb 2013 ) is only configured to expect the IPV4 address range, but the Apache that is delivered with WAMPServer is aware of both the IPV4 and IPV6 address ranges and is happy to use either or in fact both.
I am not sure how Windows/Browsers decide which range to use but it appears to be fairly arbitrary, so you can get either.

This is the route of your problem.

There are 2 ways you can go to solve this small anomily. You can either ignore the IPV6 address range or change the security to include the IPV6 address range.


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
KEEP COPIES OF ALL FILES CHANGED SO YOU CAN EASILY UNDO THESE CHANGES IF THEY DO NOT WORK FOR YOU

In fact copy c:\wamp to a backup location and then you can just replace
the whole folder if you have problems with your changes.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Option 1 is easier to do.
==============================================================
Option 1:
Ignore the IPV6 address range.

Use the wamp menus to edit these files where possible.

edit httpd.conf
change Listen 80 TO Listen 0.0.0.0:80
The 0.0.0.0 part tells Apache to only listen on IPV4 addresses.


edit c:\windows\system32\drivers\etc\hosts
If it exists, remove or comment out (comment is a # in colum 1) the line containing the IPV6 address for localhost >::1 localhost
(This makes the domain 'localhost' disappear from the IPV6 network, its existance is not hard coded anywhere it has to be mentioned in the hosts file to make it exists)
Make sure you have a line in the hosts file like this >127.0.0.1 localhost
(This makes the domain 'localhost' exists on the IPV4 network)

Wamps security should now work after a reboot. And
http://localhost
should now get you to wamps Apache installation. The exisiting security should also now work for phpMyAdmin,WebGrind and SQLBuddy


============================================================
Option 2:
Add the IPV6 address range to wamps security.


Again always use the wamp menus to edit these files where possible.

!!!! Make sure WAMP is set to 'Offline' before starting this part.


Now this is the dangerous bit!!!!! You must get these next 2 edits right. The text between the double quotes in C:\wamp\scripts\onlineOffline.php must match exactly that used in the httpd.conf file, so a copy and paste would be recommended. If you get this wrong the Online/Offline process will not work.

edit httpd.conf

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

TO
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1

Note we have added the ::1 IPV6 localhost address to the security, make sure there is a space between 127.0.0.1 and ::1.


Edit C:\wamp\scripts\onlineOffline.php
Change

$offlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1";

TO

$offlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1";

This makes sure that the Online/Offline process still works in WampServer. Make sure that this exactly matches your change above made to httpd.conf


Now edit each of the files
C:\wamp\alias\phpmyadmin.conf
C:\wamp\alias\sqlbuddy.conf
C:\wamp\alias\webgrind.conf

were ever you see >127.0.0.1 change it to >127.0.0.1 ::1
Ignore the lines that start with a #, as these are comment lines

This tells Wamp that whichever ip address from either address range you get for the domain localhost, is allowed to access the apache server.
Now whichever address range windows/browser picks for you when you use the
http://localhost
domain the security will allow you in.

edit c:\windows\system32\drivers\etc\hosts
In Windows8 you will probably see both domains in the file, but this is not guaranteed. When you are finished it should look like this.

127.0.0.1 localhost
::1 localhost

This makes the domain localhost appear on both the IPV4 and IPV6 address ranges.


When you get as far as accessing MySQL you will see that the 'root' user is configured so that it can be accesses from localhost and 127.0.0.1 and ::1 so that is all ready to go and needs no changes.

If you decide to change the password for the 'root' userid in mysql, make sure you use the same password for all the instances of root that exist in mysql. A complete MySQL userid is associated with a location, so it is not the same userid when you login from root@127.0.0.1 as when you login from root@::1. This is why there are 3 'root' userids in the default MySQL userid configiration.

Options: ReplyQuote
Re: Windows 8: You don't have permission to access / on this server.
Posted by: keljnr (---.as13285.net)
Date: February 07, 2013 02:07PM

BOB ON! Thanks or all your help Riggs! Lifesaver!!
Can get some work demolished now :-)

Cheers again Pal!

Options: ReplyQuote
Re: Windows 8: You don't have permission to access / on this server.
Posted by: RiggsFolly (---.as13285.net)
Date: February 07, 2013 02:53PM

Glad to be of assistance.

If you have any comment, additions, spelling corrections, please feel free.

Options: ReplyQuote
Re: Windows 8: You don't have permission to access / on this server.
Posted by: pmundkur (---.bstnma.fios.verizon.net)
Date: February 09, 2013 12:50AM

I wish there was a way to flag messages (is there?) -- te answer provided here was very thorough and well written (sorry I did not make a note of the posters ID ) -- thanks very much !!

Options: ReplyQuote


Sorry, only registered users may post in this forum.