Chrooting Apache2 With mod_chroot On Debian Squeeze

Discussion in 'HOWTO-Related Questions' started by SaintGermain, Mar 14, 2013.

  1. SaintGermain

    SaintGermain New Member

    Hello,

    I am becoming crazy with this problem.
    I am trying to setup Apache 2.2.16 in a chroot with Debian Squeeze.

    I followed the howto step by step using the symlink methods and then I couldn't access my website because of this error:
    So I tried removing the symlink and directly put the directory in /var/www/var/www.
    I then got an error:
    I checked that permissions for /var/www/var/www are OK.
    I am accessing my website through the following url http://localhost/toto

    Here is my httpd.conf (I don't use VirtualHost):
    Can someone please help understand this problem ?

    Thanks !
     
  2. almere

    almere Member HowtoForge Supporter

    Hi there.

    Try to set Options FollowSymLinks in your apache config
     
  3. SaintGermain

    SaintGermain New Member

    Hello !

    I have already tried FollowSymLinks and I have the same error message (Symbolic link not allowed or link target not accessible: /var/www ).

    That's why I choose to directly move my website directory in the chroot in order to skip this problem: toto website directory is now directly in /var/www/var/www/toto (and I even left a copy in /var/www/toto in case I have misunderstood something).

    So I am still a little confused why it still not work ? :confused:

    Thanks for the help !
     
  4. almere

    almere Member HowtoForge Supporter

    /var/www/var/www/toto
    I see it for the first time... Do you have any errors in apache error log?
     
  5. SaintGermain

    SaintGermain New Member

    Yes the following error:
     
  6. almere

    almere Member HowtoForge Supporter

    Try this

    Code:
    
    <Directory /var>
      Order allow,deny
      Allow from all
    </Directory>
    
    
     
  7. SaintGermain

    SaintGermain New Member

    I think I already tried that with the same error but I am not sure anymore.
    I will try again in 8 hours (not at home right now) and keep you updated !

    Thanks !
     
  8. SaintGermain

    SaintGermain New Member

    I'll be damned, it works !! :)

    Now I have to understand why it was not covered by the directive:

    Code:
    <Directory />
      Order allow,deny
      Options All
      Allow from all
      AllowOverride All
    </Directory> 
    
    But thank you so much ! I have been stuck on this problem for hours !
     

Share This Page