In menuconfig
MOD_CHROOT
is in:
Networking|WWW
Final list of file:
/usr/lib/apache2/modules/mod_chroot.so
In /etc/apache2/httpd.conf:
-
Uncomment and change:
#LoadModule chroot_module usr/lib/apache2/modules/mod_chroot.so
in:
LoadModule chroot_module /usr/lib/apache2/modules/mod_chroot.so
-
Add:
ChrootDir "<CHROOTDIR>" ( e.g. ChrootDir "/home/apache2")
LoadFile "/lib/libnss_dns.so.2" (DNS resolution)
In /etc/apache2/ssl.conf:
-
Change:
#SSLSessionCache none
SSLSessionCache dbm:/var/run/ssl_scache
SSLSessionCacheTimeout 300
in:
SSLSessionCache none
#SSLSessionCache dbm:/var/run/ssl_scache
#SSLSessionCacheTimeout 300
-
And change:
SSLMutex file:/var/run/ssl_mutex
in:
SSLMutex sem
Important:
- In VirtualServer the DocumentRoot is relative to <CHROOTDIR>
- Perl, Php, Python etc.. don't work, use apache modules (mod-perl, mod_php, mod_python)
- MySQL/PostgreSQL work in loopback only (127.0.0.1)
- PHP mail() don't work, use PEAR mail, phphmailer (? I think) or SSMTP (sendmail clone)
- For problem, check project message archive (link on homepage)
- Apache don't install this module, two alternative workaround:
-
Before make iso execute this command:
cp -dpR /usr/lib/apache2/modules/mod_chroot.so /build/tmp/ISO/cdtree/usr/lib/apache2/modules/
After, in apache configuration, add (/etc/apache2/httpd.conf):
LoadModule chroot_module /usr/lib/apache2/modules/mod_chroot.so
-
Replace httpd script:
cd <LFSSystem>/build/scripts (e.g. cd /usr/src/lfssystem/build/scripts)
tar -zxf <PATH_TO_FILE>/httpd.tgz
|