Apache 2.4.18 Win10 no permission to access 403
Posted by: Sheepdog (---.as13285.net)
Date: July 15, 2016 08:12PM

I've used Wampserver many times over the years. I've spent a day, including a full reinstall, and many hours with Google FAILING to install it on a new machine on my LAN.

On a "simple" LAN, with some Win7, some Win10 machines, I put the Wampserver current 15 Jly 16 (details below) on a "virgin" Win10 machine. The machine has a static local IP address. Access to index.php works fine from the machine the server is on.

If I put the machine's IP address into a browser running on a different machine on the LAN, I get an "answer" from the server: "Forbidden. You don't have permission to access / on this server."

The server's access log shows the attempt...

192.168.0.2 - - [15/Jul/2016:18:55:45 +0100] "GET / HTTP/1.1" 403 298

The server's error log shows...

[Fri Jul 15 18:55:45.236345 2016] [authz_core:error] [pid 352:tid 1144] [client 192.168.0.2:2031] AH01630: client denied by server configuration: C:/wamp/www/

====
So I'm thinking that there isn't a firewall issue, or somesuch? Or that the Apache is poorly installed? (Yes, I installed the VC++ redistribs... as admin. 32 AND 64 bit versions. Before Wampserver.)

Am I too optimistic? Does the exchange of messages between client and server make a firewall, etc, issue unlikely as culprit?

====
I've spent hours on the <Directory "c:/wamp/www/"> block of httpd.conf file. My fingers do "save file"/"restart Apache"/Retry fetching webpage on autopilot.

The number of variations out on the web as to what you do and do not need there boggle the mind... it seems that the move to Apache 2.4 from earlier is leaving some very confused httpd.conf files in its wake! Scraps of the old mixed up with "the right way" from the new. I've tried to consider carefully how "authoritative" the sources I've used have been.

====
I'd like to avoid all the complexities of Virtual Hosts. I've never needed them before. My wants are very modest. (I'll try to "be good", and try Virtual Hosts later... once I get the basic Wampserver working! I don't want to start working on "extra" stuff before "the basics" work, do I? How do I know if any problems lie in the Virtual Host element or the foundations?)

====
Where do you think I should put my next debugging energies?

Tom

File I downloaded, installed, on my 64 Bit Win 10 machine....

wampserver3.0.4_x86_apache2.4.18_mysql5.7.11_php5.6.19-7.0.4

Wampserver's index.php reports....


Version 3.0.4 - 32bit

Server Configuration

Apache Version:
2.4.18 - Documentation
PHP Version:
5.6.19 - Documentation
Server Software:
Apache/2.4.18 (Win32) PHP/5.6.19 - Port defined for Apache: 80



Edited 1 time(s). Last edit at 07/15/2016 08:24PM by Sheepdog.

Options: ReplyQuote
Re: Apache 2.4.18 Win10 no permission to access 403
Posted by: Otomatic (Moderator)
Date: July 15, 2016 08:56PM

Hi,

You need to use Virtualhost.

It is not complex ! With Wampserver 3.0.5 you can create VirtualHost with three Cliks.

Read the Note: The need of VirtualHost.

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

Options: ReplyQuote
Re: Apache 2.4.18 Win10 no permission to access 403
Posted by: RiggsFolly (Moderator)
Date: July 15, 2016 09:25PM

Hi,

WAMPServer 3 has a Virtual Host defined for `localhost`, so basically the "Put Online/Put Offline" menus are not defunct.

Also as you have noticed changing the httpd.conf `<Directory "c:/wamp/www/">` sections does nothing.

All you need to do is edit \wamp\bin\apache\apache{version}\conf\extra\httpd-vhosts.conf and add your network access requirement there like you would have done before

---------------------------------------------------------------------------------------------
(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: Apache 2.4.18 Win10 no permission to access 403
Posted by: Sheepdog (---.as13285.net)
Date: July 15, 2016 10:12PM

Thank you! I've started my Virtual Host Education. Don't need any more replies for the moment... fear not.... (or "fear"?)... I'll be back if that doesn't go well.

For others reading this thread...

WAMPSERVER 2.5 and above: I'm told you MUST use Virtual Hosts, at least one, anyway, for anything beyond access from the machine the server is on. Don't make my mistake, and think that because you are using APACHE 2.4 you are exempt.

The Good News is that there are good resources. Well. They LOOK good... haven't worked myself through them yet. Note that they come in two flavors... You SHOULD read BOTH, of course... but...

Why are Virtual Hosts a Good Thing...

[forum.wampserver.com]


How to get going with them...

[forum.wampserver.com]

Options: ReplyQuote
Re: Apache 2.4.18 Win10 no permission to access 403
Posted by: Sheepdog (---.as13285.net)
Date: July 16, 2016 12:05AM

Umm....

Well, that was... "interesting".

I think I've done everything at the two pages cited.

Now I can look at my original c:wamp\www\index.htm AND the one I've put in the folder I set up for my first Virtual Host. (For the sake of argument, let's say I called it mfvh, and created, used, c:/wamp/www/mfvhf/ for it.

But I can't access either from another pc on the LAN the server is on. I even edited the <directory> block for the virtual host, in C:\wamp\bin\apache\apache2.4.18\conf\extra\httpd-vhosts.conf, to change "Require local" to "Require all granted". And restarted Apache.

====
Call me dumb, but it took me a while to get to the following... do I have it right??

To access the virtual host across my LAN, I have to edit the HOSTS file on the pc which, across the LAN, is going to access the server??? (And then use, say, h-t-t-p://myfirstvh, if I named my host "myfirstvh" (ignore the hypens... needed them to stop forum software turning the thing into a link))

Is there no way to allow any machine on the LAN access to the server without the HOSTS file edit?? Isn't there some way to use the serving machine's local IP address, plus... something?

What about access to the server from the WAN? I use DynDns to create a URL that takes "the world" to the WAN side of my router. And NAT table entries to send enquiries for port 80 to the right pc on the LAN, the one with Apache running on it. PLEASE tell me that will work when Apache is serving via a vitual host?? As more than one virtual host can be active, how/ where does someone seeking stuff from the server tell Apache which folder to look in for the files to be served??



Edited 8 time(s). Last edit at 07/16/2016 12:54AM by Sheepdog.

Options: ReplyQuote
Re: Apache 2.4.18 Win10 no permission to access 403
Posted by: Otomatic (Moderator)
Date: July 16, 2016 09:47AM

Hi,

> Now I can look at my original c:wamp\www\index.htm
Don't put your files in c:\wamp\www\ This folder is reserved for the home page Wampserver 'http://localhost/' and should not be changed or files inside modified or replaced.
However, you can add one or more folder, such as "c:\wamp\www\folder1\", where you can then put your local sites.
But there is no requirement that your local sites are in "c:\wamp\www\", they can be in another folder on on another partition.

> Is there no way to allow any machine on the LAN access to the server without the HOSTS file edit?
You have every right to install a DNS server on your machine; in this case you can skip using the hosts file.
In case you did not know, the "hosts" file and services like "dnscache" acts as mini local DNS server.

I will never understand those who want to use their own PC as a host, with all the problems and hassles that generates, not to mention the security constraints, while there are excellent hosts, cheap, with fast and efficient customer service and all the required knowledge.
And, for Intranet development: Network Administrator is a profession that requires training and knowledge.


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



Edited 2 time(s). Last edit at 07/16/2016 10:37AM by Otomatic.

Options: ReplyQuote
Re: Apache 2.4.18 Win10 no permission to access 403
Posted by: Sheepdog (---.as13285.net)
Date: July 16, 2016 10:37AM

1))
> Don't put your files in c:\wamp\www\...

Understood! I was just reporting progress on reading ANYTHING from the server! I'd grasped that I shouldn't change what's in that folder.


2)) (edited, 10:15 UK time, 16 Jly 2016)...

>> Is there no way to allow any machine on the LAN access to the server without the HOSTS file edit?
>You have every right to install a DNS server on your machine..

Ah. I was having enough "fun" with moving from old Apache to new!

i) I'm not confident enough to mess with my router's firmware. Settings, yes, of course. Features in the code... no.

ii) So, I guess... I install a DNS name server on one of the machines on my LAN, tell the router to look there for DNS services first, with an "outside" DNS server for everything else?

I realize that "understanding may be imperfect... but do you have hope that if I start down that path, I might "get there" in the end? Or am I WAY off base??

Please recommended a free, open source, multi-platform DNS servers to "play nicely" with WAMP and Windows 10?

Yes- I realize this is not a "how to set up DNS" forum! I'm sure I can find the right forum... once I find the right DNS software... but I would be very grateful for help from the WAMPserver community on whether I even need to THINK about adding another "thing to go wrong" to my system... to support my WAMPserver.

===
I usually leave "thank yous" out of forum posts, but this whole thing is a big nightmare for me, and without the help in the replies provided, I really would be a mess, and in a mess... so I'll make an exception- thank you!



Edited 2 time(s). Last edit at 07/16/2016 11:20AM by Sheepdog.

Options: ReplyQuote


Sorry, only registered users may post in this forum.