Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

403 (forbidden) on Vhosts #43

Open
erikaheidi opened this issue Sep 20, 2013 · 4 comments
Open

403 (forbidden) on Vhosts #43

erikaheidi opened this issue Sep 20, 2013 · 4 comments

Comments

@erikaheidi
Copy link

Hello,

As I mentioned on Twitter, I'm having 2 small issues while using this apache module for a Vagrant box, with Ubuntu 12.04 .
The apache version being installed is 2.4.6 .

First one is that when trying to override the default vhost conf file, following the readme instructions, it was creating a file named "000-default" on sites-enabled, not overriding the 000-default.conf file - which caused it to not change the doc root as expected (ofc).

I could fix this by adding priority => 000 on the vhost declaration.

The other bug annoyed me for quite a long time: I was getting a 403 forbidden error on the Vhost I just setup. Adding "AllowOverride All" and other options (to explicitly add the Directory block) didn't change anything. The log says:

[Fri Sep 20 12:00:00.312316 2013] [authz_core:error] [pid 17445] [client 192.168.33.1:57254] AH01630: client denied by server configuration: /vagrant/web/

Luckily(!), I had the same problem with my local environment (ubuntu 13.04) before, and after googling I found this: http://stackoverflow.com/questions/10351167/apache-client-denied-by-server-configuration

Looks like is something new from Apache, adding this line: Require all granted to the Directory block fixed the problem.

I think the default vhost template might need an update.

@alvagante
Copy link
Member

For overriding the default file on Debian file something like what you did is what you need:
apache::vhost { 'default':
priority => '000',
template => ...
}
if you saw some docs around stating different tings, please point me there.

For the client denied error we probably need to add an apache-version fact and provide different versions of the default template. The current workaround is to specify your own template with the content you need.

@jimmykane
Copy link
Contributor

Is there any progress on this?

@alvagante
Copy link
Member

I suppose that a "Require all granted" line on older Apache versions would bring a syntax error, so the only current solution is to provide a custom template and the right solution would be to introduce an apache fact that returns the version installed, and use it in the default template to manage the correct output.

@jimmykane
Copy link
Contributor

Sure I was just asking if there was any plans on this to be implemented. I can check it out later. Of course the proposed solution worked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants