Hi there
I’m wondering if someone can help or advise me. I’ve had a Yii built site running on a multi-site apache environment for a short while now and it’s mysteriously gone down with an apache error message “Forbidden - You don’t have permission to access / on this server.”
There are multiple other sites running on the same server, some WordPress sites and two Yii sites including the site in question. All of the other sites remain up.
Since it appears to have been down a short while I’m not entirely sure what happened to cause it, but I was editing file permissions for some of the adjoining directories on the same server. I must have done something to cause this of course, but can’t for the life of me work out what.
The site is within directory /var/www/{site-name}/public_html
permissions are as follows:
/{site-name}: drwxrwxr-x 3 www-data www-data
/public_html: drwxrwxr-x 9 www-data www-data
My .htaccess files contain the following:
Top level directory:
Options +FollowSymLinks=
IndexIgnore /
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Protected directory:
Options +FollowSymLinks
IndexIgnore /
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
My apache site config file is as follows:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request’s Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin email@gmail.com
ServerName site-name
ServerAlias www.site-name
DocumentRoot /var/www/site-name/public_html
<Directory "/var/www/site-name/public_html">
# use mod_rewrite for pretty URL support
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
vim: syntax=apache ts=4 sw=4 sts=4 sr noet
I’m really stumped by this, any help/assistance/advice would be appreciated.
Best regards