Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 127.0.0.1] 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

/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 127.0.0.1
    Deny from all
</Directory>

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

<virtualHost *:80>
    ServerAdmin webmaster@srp.com
    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
    </Directory>

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

# Logfiles
    ErrorLog  /var/www/vhosts/srp.com/logs/error.log
    CustomLog /var/www/vhosts/srp.com/logs/access.log combined
</virtualHost>
share|improve this question

migrated from stackoverflow.com Mar 16 '13 at 17:54

This question came from our site for professional and enthusiast programmers.

    
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 '13 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. –  LF4 Mar 18 '13 at 4:57

1 Answer 1

up vote 0 down vote accepted

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.

http://stackoverflow.com/questions/15588813/codeigniter-blank-page-and-error-500-in-apache-log

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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