Pages: 12Next
Current Page: 1 of 2
Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (152.238.118.---)
Date: November 28, 2016 10:40PM

Hi, I just install the latest wamp 3.06.

I am using Windows DataCenter Server.


I have the next Virtual Hosts file, and I am getting the nex error when acccess remotely my site with:

"Forbidden

You don't have permission to access /webagenda on this server.
Apache/2.4.23 (Win64) PHP/5.6.25 Server at agenda.myvnc.com Port 8000"

Virtual Hosts:

<VirtualHost *:8000>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


<VirtualHost *:8000>
ServerName cloudappoint
ServerAlias cloudappoint.myvnc.com
DocumentRoot c:/wamp64/www/webagenda
ErrorLog "logs/agenda-error.log"
CustomLog "logs/agenda-access.log" common
<Directory "c:/wamp64/www/webagenda/">
Options +Indexes +FollowSymLinks +MultiViews
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


but If i use the next all works well.

Is Directory broken into Virtual Hosts with Wamp 3.06



<VirtualHost *:8000>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


<Directory "c:/wamp64/www/webagenda/">
Options +Indexes +FollowSymLinks +MultiViews
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>


<VirtualHost *:8000>
ServerName cloudappoint
ServerAlias cloudappoint.myvnc.com
DocumentRoot c:/wamp64/www/webagenda
ErrorLog "logs/agenda-error.log"
CustomLog "logs/agenda-access.log" common
</VirtualHost>

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: Otomatic (Moderator)
Date: November 29, 2016 04:29PM

Hi,
I also noticed an Apache behavior that seems odd!
And despite all the Apache documentation, I do not understand such behavior.

If I declare a VirtualHost like this:
<VirtualHost *:80>
  ServerName techaero
  DocumentRoot j:/wamp/www/techaero
  <Directory "j:/wamp/www/techaero/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride all
    <RequireAny>
      Require local
      Require ip 192.168.0
    </RequireAny>
  </Directory>
</VirtualHost>
And if I try to access this VirtualHost from a post on the network, in this case, a Smartphone with local IP 192.168.0.15 on WiFi, I get an access ban:

Forbidden
You don't have permission to access /techaero/index.php on this server
With in the Apache access.log
192.168.0.15 - - [29/Nov/2016:15:32:44 +0100] "GET /techaero/index.php HTTP/1.1" 403 -
and in the apache_error.log
[Tue Nov 29 15:32:44.925685 2016] [authz_core:error] [pid 6692:tid 924] [client 192.168.0.15:49385] AH01630: client denied by server configuration: J:/wamp/www/techaero/index.php, referer: [192.168.0.10]

But if I declare the VirtualHost like this:
<VirtualHost *:80>
   ServerName techaero
   DocumentRoot j:/wamp/www/techaero
</VirtualHost>

<Directory "j:/wamp/www/techaero/">
  Options +Indexes +Includes +FollowSymLinks +MultiViews
  AllowOverride all
    <RequireAny>
      Require local
      Require ip 192.168.0
    </RequireAny>
</Directory>
That is, with the <Directory ....> </Directory> structure outside the VirtualHost structure.
There is no ban and everything works perfectly.

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

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (152.238.118.---)
Date: November 30, 2016 01:02AM

Yes, Itis exactly the same problem I have. I think Directory into Virtual Hosts is broken at 3.06 Wamp server.

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: RiggsFolly (Moderator)
Date: November 30, 2016 10:11AM

If moving the `<Directory>` block out of the `<VirtualHost>` block causes access to be allowed then it is a fair assumption that there is something wrong with the `<VirtualHost>` definition.

Can I suggest that you try this change in your definition

    <VirtualHost *:8000>

        ServerName cloudappoint.myvnc.com           <--change
        ServerAlias www.cloudappoint.myvnc.com      <--change

        DocumentRoot c:/wamp64/www/webagenda
        ErrorLog "logs/agenda-error.log"
        CustomLog "logs/agenda-access.log" common
        <Directory "c:/wamp64/www/webagenda/">
            Options +Indexes +FollowSymLinks +MultiViews 
            DirectoryIndex index.php
            AllowOverride All
            Require all granted
       </Directory>
    </VirtualHost>

There is a link to the Apache manual in my signature block

---------------------------------------------------------------------------------------------
(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 2 time(s). Last edit at 11/30/2016 11:20AM by RiggsFolly.

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (---.user3g.veloxzone.com.br)
Date: December 01, 2016 09:16PM

Hi, Mr RiggsFolly

I did the changes, but the result is the same. I still have Forbidden error.

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: RiggsFolly (Moderator)
Date: December 02, 2016 10:16AM

Hi,

Then something else is going on here that you have not mentioned.

I assume you are adding the non standard port number to the url when trying to access the site?

When I add the :8000 I do not get the error I get an offline page saying

Quote

The site you have requested is currently unavailable, please try back again later.

---------------------------------------------------------------------------------------------
(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: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (---.user3g.veloxzone.com.br)
Date: December 02, 2016 12:50PM

Hi,

I have no-ip to manage my domains:

This is my setup in no-ip. I use a URL redirect

cloudappoint.myvnc.com 35.161.27.243:8000/webagenda

and a mask to avoid shows port number in browser address.

I just get rid off http:// in front of address to shows in this post.


But ,this is not the problem, because if I use 35.161.27.243:8000/webagenda instead of cloudappoint.myvnc.com I have the same problem with: Forbidden error



Edited 5 time(s). Last edit at 12/02/2016 01:49PM by jwest.

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: RiggsFolly (Moderator)
Date: December 02, 2016 02:50PM

As far as I remember ( i have not actually used NO_IP) but I have used the DYNDNS service which is similiar, you cannot put the port number in to the Dynamic DNS service as its whole purpose is to be used to forward a web address and that is assumed to be on port :80.
(I may be wrong about NO_IP)


When you enter an ip address Apache looks at its Virtual Hosts and attempts to match a ServerName to the domain name entered in the URL, if you use the IP address it does not see anything that matches an ip as domain name and defaults to the first VH defined in the https-vhosts.conf file which of course should be localhost and that should not be accessible from the general internet so you get the access violation error.

Like I said when I use the URL 'http://cloudappoint.myvnc.com:8000' I see an Offline page (nothing to do with WAMPServer) it must be a page generated by the site you have installed Did you try that


[imgur.com]


My suggestion would be to revert back to using port 80 and then things will work far more naturally.

---------------------------------------------------------------------------------------------
(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: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (---.user3g.veloxzone.com.br)
Date: December 03, 2016 01:47AM

>>As far as I remember ( i have not actually used NO_IP) but I have used the DYNDNS service which is similiar, >>you cannot put the port number in to the Dynamic DNS service as its whole purpose is to be used to forward >>a web address and that is assumed to be on port :80.

Sorry but you are wrong about it. With no-ip, I can do it. With versions before 3.06 all works well. The problem is with 3.06.

See the no-ip FAQ about it:


"What is a Web or URL Redirect?

A web or URL redirect allows you to have one short name for a web page the has a long URL. For example you can have mysite.hopto.org redirect to www.asite.com/one/really/really/long/url/.
You can also use URL redirects to get around ISP’s that block port 80. For example [mysite.hopto.org] could redirect to a hostname running on a different port myothersite.hopto.org:8080/."

So, I am almost sure the problem is only with 3.06.

I have many redirects url working well before 3.06.

And, If what you say is true, that does not explain why move directory out from virtual hosts make the problem disappears.



Edited 3 time(s). Last edit at 12/03/2016 01:54AM by jwest.

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: Otomatic (Moderator)
Date: December 03, 2016 09:23AM

Hi,

Exit Wampmanager

Open a command windows - as an administrator - then type

net start wampapache (or wampapache64 for 64 bit version)
net start wampmysqld (or wampmysqld64 for 64 bit version)

Without starting Wampmanager, check if the problem is the same.

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

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (---.user3g.veloxzone.com.br)
Date: December 03, 2016 03:38PM

Otomatic Wrote:
-------------------------------------------------------
>
> Open a command windows - as an administrator -
> then type
>
> net start wampapache (or wampapache64 for 64
> bit version)

> net start wampmysqld (or wampmysqld64 for 64
> bit version)


Hi, thank you for your response, but I am using windows datacenter in amazon ec2 with latest wamp version 3.06 and there is no wampapache or wampapache64 service or application with this name.

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: RiggsFolly (Moderator)
Date: December 03, 2016 03:55PM

Apache and MYSQL run as service on windows.

If there is no service then you did not install WAMPServer correctly, but if that was the case you would not be getting the Apache error message.

So I would suggest you look again.

However it is starting to look like you are using many technologies that as yet you do not really understand.

---------------------------------------------------------------------------------------------
(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: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: Otomatic (Moderator)
Date: December 03, 2016 04:24PM

Hi,

Quote
jwest
Hi, thank you for your response, but I am using windows datacenter in amazon ec2 with latest wamp version 3.06 and there is no wampapache or wampapache64 service or application with this name.
If there is no "wampapache" or "wampapache64" service, it is not wampserver. Whatever the versions of wampserver, since Wampserver 2.0 there must be a "wampapache" or "wampapache64" service.
So you use something other than Wampserver.

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

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (---.user.veloxzone.com.br)
Date: December 03, 2016 10:02PM

Otomatic Wrote:
-------------------------------------------------------
Sorry my error, I just find it. I did a typo.

Here is the result:
C:\>net start wampapache64
The wampapache64 service is starting.
The wampapache64 service was started successfully.

But, the Forbidden error is the same if I put Directory into Vitrtual Hosts.



Edited 4 time(s). Last edit at 12/03/2016 10:16PM by jwest.

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (---.user.veloxzone.com.br)
Date: December 04, 2016 02:07AM

RiggsFolly Wrote:
-------------------------------------------------------
> Apache and MYSQL run as service on windows.
>
> If there is no service then you did not install
> WAMPServer correctly, but if that was the case you
> would not be getting the Apache error message.
>
> So I would suggest you look again.
>
> However it is starting to look like you are using
> many technologies that as yet you do not really
> understand.

Mr RiggsFolly,

I have Amazon EC2 since three years ago. I also have used wamp server 2.x in the past, with similar configurations, without problems.

As Otomaitc Moderator posted, He has the same problem that I have.

So, I am not alone. It´s very strange why others users don´t reported this problem.

I am pretty sure there is something wrong with VirtualHosts when we put Directory into it.



Edited 3 time(s). Last edit at 12/04/2016 05:55AM by jwest.

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: Otomatic (Moderator)
Date: December 04, 2016 09:57AM

Hi,

> As Otomaitc Moderator posted, He has the same problem that I have.
That's why I asked you to run only the wampapache and wampmysqld services without starting Wampserver.
This is to show that it is a problem between Apache and Windows or between Windows and Apache and absolutely not a default of Wampserver 3.0.6.

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

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: RiggsFolly (Moderator)
Date: December 04, 2016 03:45PM

HI

Just a note. I use WAMPServer 3.0.6

I have been using Virtual Hosts for years. My current configuration contains some 20 sites.
Some of these are available on just the PC running WAMPServer, other are available on my local network, and others are available (occasionally for user testing) on the internet.

I have not had any issues using VH and I always specifiy my VH with the Directory tag inside the Virtual Host tag.


Now I admit I do not use an Amazon VM to run these site.

Your comment:
I am pretty sure there is something wrong with VirtualHosts when we put Directory into it.

would mean that EVERY user of Apache on Windows would be having these issues, and they are not
Remember this is Apache and not a proprietary web server written for WAMPServer.

---------------------------------------------------------------------------------------------
(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: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (---.user.veloxzone.com.br)
Date: December 04, 2016 06:19PM

RiggsFolly Wrote:
-------------------------------------------------------
> Your comment:
> I am pretty sure there is something wrong with
> VirtualHosts when we put Directory into it.

>
> would mean that EVERY user of Apache on Windows
> would be having these issues, and they are
> not

> Remember this is Apache and not a proprietary web
> server written for WAMPServer.

OK, Mr RiggsFolly. Is there a way to debug with my current windows install to see where is the problem. I have seen httpd.exe -S, but is not sufficient.

here is my apache error log:
[Sun Dec 04 17:26:56.560677 2016] [authz_core:error] [pid 2512:tid 1152] [client 186.241.87.33:1780] AH01630: client denied by server configuration: C:/wamp64/www/webagenda
[Sun Dec 04 17:26:57.321647 2016] [authz_core:error] [pid 2512:tid 1152] [client 186.241.87.33:1780] AH01630: client denied by server configuration: C:/wamp64/www/webagenda
[Sun Dec 04 17:28:23.088090 2016] [authz_core:error] [pid 2512:tid 1148] [client 186.241.87.33:1796] AH01630: client denied by server configuration: C:/wamp64/www/webagenda



Edited 1 time(s). Last edit at 12/04/2016 06:31PM by jwest.

Options: ReplyQuote
Re: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: RiggsFolly (Moderator)
Date: December 04, 2016 07:05PM

Can I suggest a Team Viewer session. As we are obviously getting knowhere like this.

I am on GMT time and can be available 09:00 to 21:00.

If we can arrange a time were we can both be available for an hour or so let me know.

Then install Team Viewer and send me a private message with the ID and PASSWORD

Tomorrow would seem the best idea now

---------------------------------------------------------------------------------------------
(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: Forbidden with Virtual Hosts in Wamp 3.06
Posted by: jwest (---.user.veloxzone.com.br)
Date: December 05, 2016 12:25AM

RiggsFolly Wrote:
-------------------------------------------------------
> Can I suggest a Team Viewer session. As we are
> obviously getting knowhere like this.

Thank you Mr RiggsFoilly, I will send you the TeamViewer ID and Pawword tomorrow.

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


Sorry, only registered users may post in this forum.