1

I'm running my local development sites on a Windows machine with Uniserver. I have them all set up as vhosts and they work fine with Drupal 7. Recently I decided to install a vhost with Drupal 8, but when I go to the site I get the following error:

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

The error log for the site says:

Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions

If I add Options +FollowSymLinks to the vhost's .htaccess file, it works fine. How should I be doing this? I can't imagine Drupal 8 is supposed to have this done on every installation. For reference, I'm running the site on:

  • Apache 2.4.18
  • PHP 5.6.18
  • MySQL 5.6.28
1

I can't imagine Drupal 8 is supposed to have this done on every installation.

You're right, it only needs to be done in .htaccess where altering the web server config isn't an option (think shared hosting).

In a local dev environment you don't have that problem, so just update the vhost with something like

<Directory "/var/www/site/public_html">
  Options FollowSymLinks
  AllowOverride All
  Require all granted
</Directory>

and re-start/load Apache for it to take effect.

  • Thanks for the help! The Uniform Server httpd-vhosts.conf file already had Options Indexes Includes AllowOverride All Require all granted for the applicable vhost, I just had to change the first line to Options Indexes Includes FollowSymLinks – druque Jun 27 '16 at 10:16
0

I've also had a problems with "You don't have permission to access / on this server", but for completely different reason - I've forgot to put the domain in /etc/hosts file (as explained here).

Sharing here for those who are forgetful as me :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.