Alright I've been hitting my head against the desk trying to figure out whats going on with this virtual host. I'm able to load the standard html and php files from the default doc root but can't load any virtual hosts.

I'm confused as apache is able to write to the logs directory for the srp.com vhost but the error log just has "[error] [client] Symbolic link not allowed or link target not accessible: /var/www/vhosts". From what I have been reading thats an issue with vhosts being a symlink but I've included the FollowSymLinks option.

What have I over looked when trying to set the vhosts up?

Apache2 is running at www-data user.
Default DocumentRoot is /var/www


drwxrwsr-x 2 www-data www-data 4096 Mar 14 22:49 .
-rw-rw-r-- 1 www-data www-data  64 Nov 27 23:35 index.php
-rw-r--r-- 1 www-data www-data 181 Mar 14 22:13 index.html
lrwxrwxrwx 1 www-data www-data  46 Mar 14 22:49 vhosts -> /mnt/slackhome/krizzo/Dropbox/websites/vhosts/

The /var/www/vhosts/srp.com/ directory:

drwxrwxr-x  5 www-data www-data 4096 Mar 14 22:04 .
drwxrwsr-x 13 www-data www-data 4096 Mar 14 22:02 ..
drwxrwxr-x  2 www-data www-data 4096 Mar 14 22:04 cgi-bin
drwxrwxr-x  8 www-data www-data 4096 Mar 14 22:01 htdocs
drwxrwxr-x  2 www-data www-data 4096 Mar 14 22:18 logs

httpd.conf file

<Directory />
    Options Indexes +FollowSymLinks MultiViews
    AllowOverride all
    Order deny,allow
    allow from
    Deny from all

srp.com (/etc/apache2/sites-available/srp.com)

<virtualHost *:80>
    ServerAdmin [email protected]
    ServerName  srp.com
    ServerAlias srp.com

# Indexes + Directory Root.
    DirectoryIndex index.php index.html
    DocumentRoot /var/www/vhosts/srp.com/htdocs/

    <Directory /var/www/vhosts/srp.com/htdocs/ >
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all

# CGI Directory
    ScriptAlias /cgi-bin/ /var/www/vhosts/srp.com/cgi-bin/
    <Location /cgi-bin>
    Options +ExecCGI

# Logfiles
    ErrorLog  /var/www/vhosts/srp.com/logs/error.log
    CustomLog /var/www/vhosts/srp.com/logs/access.log combined
  • Your vhosts symlink is wrong: /.../websites/vhosts/, not 100% sure where you want to point it but that's not a valid path.
    – Flexo
    Mar 16, 2013 at 17:01
  • @Flexo I added the ... as the path was really long for the sym link I'll correct that with the full path right now.
    – krizzo
    Mar 18, 2013 at 4:57

1 Answer 1


The solution is to make sure php has the mysql drivers installed. Code Igniter uses the @ to take control of any errors in it's sql module which means the logs will not show anything if there is an issue connecting to the database.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .