Saturday, February 9, 2019

virtualhost - Apache 2.4 on Debian issue - "Forbidden" after upgrading virtual host

I have tried many suggestions I can find via Google to make my virtual host work properly after upgrading from Debian to Jessie (upgrade from Apach 2.2 to 2.4).



I have mod_rewrite and mod_access_compat, which is why it seems to work fine when I use the old syntax. As soon as I go to Require all granted, it stops working and I get 403 Forbidden.




I have many virtual hosts and it's the same accross the board... most are Drupal installs. Here's an example of a virtual host:




ServerName www.skyjacobs.com
Redirect 301 / http://skyjacobs.com/


ServerAdmin skyjacobs@gmail.com
ServerName skyjacobs.com

DocumentRoot /www/sky

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny # These 2 lines work
allow from all #
Require all granted # If I use this line only, it stops working

ErrorLog /www/logs/sky/error.log
LogLevel warn

CustomLog /www/logs/sky/access.log combined



If I comment out the 2 lines of old syntax and use Require all granted, it stops working. Does anyone know what the problem might be? Thanks for any leads.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...