0

I have several vhosts all of which except 1 are working fine after many packages were upgraded on Ubuntu 16.04 server. The only difference between working and non-working vhosts is that the non-working vhost root directory is a sub directory of another working vhost as opposed to a direct sub directory of root. Working vhosts also do not have the directory directive but even without it non-working vhosts are still just that.

What I have tried/checked:

  • Root and all subdirectories have www-data:www-data ownership.
  • All sub directories have at least read and execute permissions.
  • Tried creating index.html with chmod 777.
  • Rebooted the server.

Apache logs only show error below for every attempted file access.

AH01630: client denied by server configuration: [dir_name_here]

Vhost file:

<VirtualHost *:443>
        ServerAdmin **********@gmail.com
        DocumentRoot /var/www/owncloud/data/***/files/***

        <Directory "/var/www/owncloud/data/***/files/***/images">
          Options +Indexes
          AllowOverride all
          Order allow,deny
          Allow from all
          Require all granted
        </Directory>

        ServerName      ***.***.com
        ServerAlias     www.***.***.com

        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
        RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
        RewriteCond %{HTTPS} off
        RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [END,NE,R=301]

        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateFile /etc/letsencrypt/live/***.***.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/***.***.com/privkey.pem
</VirtualHost>

What could be causing this? What else can I do to troubleshoot?

DominicM
  • 211
  • 3
  • 5
  • 10

1 Answers1

1

Replace

Order allow,deny
Allow from all

With

Require all granted

In apache 2.4 the above lines are deprecated and replaced with following and if you need any help after you updated the apache this doc contains the differences doc