[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
apache in a chroot jail
- To: linux-il(at-nospam)linux.org.il
- Subject: apache in a chroot jail
- From: Eran Levy <eranle(at-nospam)netvision.net.il>
- Date: Wed, 07 Nov 2001 18:45:48 +0200
- Delivered-To: linux.org.il-linux-il@linux.org.il
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
Hi,
Im Trying to run Apache in a chroot jail. I have done it once but now with
no success.
I have made all the directories (usr, lib, etc, var, home, etc.) and copied
the files to /chroot/httpd and then deleted all the directories I copied to
the chroot jail because I dont need them, I already have them in the chroot
jail.
I was reading all the HOWTOs regarding to apache chroot jail. Im using RH
so I was reading RH documents that regards to apache chroot too.
After building the jail, Im trying to run httpd with: chroot /chroot/httpd
/usr/sbin/httpd
and it gives error "Syntax error on line 65 of /etc/httpd/conf/httpd.conf:
ServerRoot must be a valid directory"
The problem is: httpd still uses the /etc/httpd/conf and not using
/chroot/httpd/etc/httpd/conf files. I have changed the ServerRoot type in
/chroot/httpd/etc/httpd/conf/httpd.conf to use /chroot/httpd/etc/httpd and
httpd still uses his regular ServerRoot.
The next thing I have tried was adding the -f option to the httpd command
but it still give the same results.
I really confused. I have edited the conf files to not use the regular
directory and use the chroot file stracuture and added the -f option to the
httpd command. What more should I do? How can I make httpd take the
configuration files from the chroot jail and not from the regular system?
BTW: I have also tried to install apache from a tarball to /chroot/httpd
but with no success when type: chroot /chroot/httpd
/chroot/httpd/usr/sbin/httpd
I get: "Cannot execute /chroot/httpd/usr/sbin/httpd: No Such file or
directory" and there is execute-able file in this directory. I can only
run the new httpd alone without the chroot command.
What more should I do to get it working? Any ideas?
--
Best Regards,
Eran Levy.
"This is Linux country. If you listen carefully, you can hear Windows
reboot..."
WebSite: http://levy.dyn.dhs.org
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il