HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Chrooting Apache2 With mod_chroot On Debian Squeeze (http://www.howtoforge.com/forums/showthread.php?t=60954)

SaintGermain 14th March 2013 22:17

Chrooting Apache2 With mod_chroot On Debian Squeeze
 
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:
Quote:

Symbolic link not allowed or link target not accessible: /var/www
So I tried removing the symlink and directly put the directory in /var/www/var/www.
I then got an error:
Quote:

client denied by server configuration: /var
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):
Quote:

Alias /toto /var/www/toto
<Directory /var/www/toto>
Options All
AllowOverride All
order allow,deny
allow from all
</Directory>
<Directory />
Order allow,deny
Options All
Allow from all
AllowOverride All
</Directory>
Can someone please help understand this problem ?

Thanks !

almere 19th March 2013 09:10

Hi there.

Try to set Options FollowSymLinks in your apache config

SaintGermain 19th March 2013 10:47

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 !

almere 19th March 2013 10:49

Quote:

Originally Posted by SaintGermain (Post 294233)
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 !

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

SaintGermain 19th March 2013 11:04

Yes the following error:
Quote:

client denied by server configuration: /var

almere 19th March 2013 11:11

Quote:

Originally Posted by SaintGermain (Post 294237)
Yes the following error:

Try this

Code:


<Directory /var>
  Order allow,deny
  Allow from all
</Directory>


SaintGermain 19th March 2013 11:14

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 !

SaintGermain 19th March 2013 21:48

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 !


All times are GMT +2. The time now is 10:53.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.