Donatas wrote:
Hi,
I'm trying to make mod_cheroot work with apache2.
# mkdir -p /var/www/localhost/htdocs/var/run
# chown -R root.root /var/www/localhost/htdocs/var/run
# ln -s /var/www/localhost/htdocs/var/run/apache2.pid /var/run/apache2.pid
the main features of httpd.conf:
PidFile /var/run/apache2.pid
ChrootDir /var/www/localhost/htdocs
DocumentRoot /
<Directory />
AllowOverride None
Options MultiViews FollowSymLinks
# <IfModule mod_access.c>
# Order allow,deny
# Allow from all
# </IfModule>
<Limit GET OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
/etc/apache2/modules.d/15_mod_chroot.conf:
<IfDefine CHROOT>
LoadModule chroot_module modules/mod_chroot.so
</IfDefine>
<IfModule mod_chroot.c>
# change this to the web root
ChrootDir /var/www/localhost/htdocs
</IfModule>
/etc/conf.d/apache2
APACHE2_OPTS="-D USERDIR -D DEFAULT_VHOST -D PHP5 -D SSL -D
SSL_DEFAULT_VHOST -D CHROOT"
After this chroot methot, apache2 starts, but pages cannot be shown.
Time-out.
This happens, when -D CHROOT is added to /etc/conf.d/apache2
What's the problem? Maby somebody has working mod_chroot?
mine works:
less modules.d/15_mod_chroot.conf:
<IfDefine CHROOT>
LoadModule chroot_module modules/mod_chroot.so
</IfDefine>
<IfModule mod_chroot.c>
# change this to the web root
ChrootDir /var/www
</IfModule>
and /etc/apache2/vhosts.d/00_default_vhost.conf:
<IfDefine DEFAULT_VHOST>
<VirtualHost *:80>
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this
directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/localhost/htdocs"
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/localhost/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch
ExecCGI MultiViews
#
There are several directories under /var/www which might be needed if
you use php or locales or date and time...
You find it with google or at the mod_php homepage.
Robert
--
[email protected] mailing list