Symlink issue

Discussion in 'General' started by woggo_85, Feb 10, 2012.

  1. woggo_85

    woggo_85 New Member

    Heya--

    I'm trying to get farming working for dkuwiki with ISPConfig, my hosting panel of choice. I've never run into any dramas running ISPConfig until now. My dokuwiki farming occurs using symlinks. These symlinks reside outside of the /var/www/dokuwiki dir location. Below is how it looks:

    drwxr-xr-x 2 apache client3 4.0K Feb 10 12:59 conf
    drwxr-xr-x 12 apache client3 4.0K Feb 9 15:40 data
    lrwxrwxrwx 1 apache client3 27 Feb 9 17:05 doku.php -> /var/lib/dokuwiki//doku.php
    drwxr-xr-x 2 apache client3 4.0K Feb 9 17:08 error
    lrwxrwxrwx 1 apache client3 27 Feb 9 17:05 feed.php -> /var/lib/dokuwiki//feed.php
    -rw-r--r-- 1 apache client3 1.4K Feb 10 11:40 htaccess-old
    lrwxrwxrwx 1 apache client3 22 Feb 9 17:05 inc -> /var/lib/dokuwiki//inc
    lrwxrwxrwx 1 apache client3 28 Feb 9 17:05 index.php -> /var/lib/dokuwiki//index.php
    lrwxrwxrwx 1 apache client3 22 Feb 9 17:05 lib -> /var/lib/dokuwiki//lib
    drwxr-xr-x 2 apache client3 4.0K Feb 9 17:08 stats

    I am using a .htaccess file which allows me to keep the site URLs looking clean so to speak. Here is the .htaccess file contents.

    RewriteEngine on
    Options +FollowSymLinks
    RewriteRule ^lib/exe/xmlrpc.php$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
    #
    RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L]
    RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L]
    RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L]
    RewriteRule ^$ doku.php [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule (.*) doku.php?id=$1 [QSA,L]
    RewriteRule ^index.php$ doku.php

    Looks all OK to me. But when I go to view the site I get the following error:

    [Fri Feb 10 13:16:07 2012] [error] [client XXX.XXX.XXX.XXX] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/iknow.example.com/web/

    I also have suExec enabled in ISPconfig and mod_php active. I've tried fiddling with these settings to no avail. I _do_ have this working with just apache + php on my testing box. I have also tried adding the option +FollowSymLinks and SymLinksIfOwnerMatch with no luck.

    Can someone please help me troubleshoot the cause of this issue? bonus points for a solution. :)

    --julian
     
  2. woggo_85

    woggo_85 New Member

    Have done further testing off this issue. I did a vanilla dokuwiki install and setup the .htaccess file and had the same issues. It is not related to the symlinks!

    If I visit index.php directly it _does_ redirect to doku.php as the .htaccess file says..

    So what could be the issue with my ISPConfig system where if I visit the root of the url it gives the error in my original post?

    --julian
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    In genneral, this setup is problematic as you have to disable most security features of ispconfig and php to make it work. So its not secure, but its possible.

    Which php mode do you use in that website and is suexec on? Have you added /var/www/dokuwiki to the open_basedir path of all sites that shall access dokuwiki files.
     
  4. woggo_85

    woggo_85 New Member

    Solved

    heya--

    Thanks for your reply. I ended up getting this working by placing the htaccess syntax in my apache options in ISPConfig in the <directory foo/bar> </directory> options.

    This has seemed to fix the symlink issues.

    But FYI - I do have suExec on and am using mod_php. I also have the dokuwiki path listed in the php_openbasedir section. I'd rather not water down the security that ISPConfig supplies, so not really interested in exploring this option.

    Again thanks for your help, and I do hope this post helps others!

    --julian
     

Share This Page