You are not logged in.

#1 2010-10-13 23:08:06

arkara
Member
Registered: 2010-05-02
Posts: 35

Help me create a chroot jail for Apache, php and mysql

I have created a chroot folder with the following commands:

mkdir /newarch
mkdir -p /newarch/var/lib/pacman 
pacman -Sy -r /newarch
pacman -S base -r /newarch
pacman -S apache mysql php -r /newarch

Now i have the chroot environment, but cannot create the jail for the
servers. For example when i start apache i get this weird stuff:

root@arch:~# /newarch/etc/rc.d/httpd start
:: Starting Apache Web Server                                                                                                                                                           [DONE] 
root@arch:~# /etc/rc.d/httpd status
:: Checking Apache Web Server status                                                                                                                                                     [STARTED]
root@arch:~#

Offline

#2 2010-10-13 23:58:02

arkara
Member
Registered: 2010-05-02
Posts: 35

Re: Help me create a chroot jail for Apache, php and mysql

Other wierd stuff that i noticed, is that when i start the httpd inside the chroot it is started normally
but the normal host cannot see it:

root@arch:etc# /newarch/etc/rc.d/httpd status
:: Checking Apache Web Server status                                                                                                                                                             [STOPPED]
root@arch:etc# /etc/rc.d/httpd status                                                                                                                                                                      
:: Checking Apache Web Server status                                                                                                                                                             [STOPPED]
root@arch:etc# cd                                                                                                                                                                                          
root@arch:~# chroot /newarch /bin/bash
[root@arch /]# /etc/rc.d/httpd status
:: Checking Apache Web Server status                                                                                                                                                             [STARTED]

Last edited by arkara (2010-10-13 23:58:45)

Offline

#3 2010-10-14 10:51:01

linux-ka
Member
From: ADL
Registered: 2010-05-07
Posts: 232

Re: Help me create a chroot jail for Apache, php and mysql

don't you have to chroot first into that jail in order to start the apache server?

Offline

#4 2010-10-14 11:13:46

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Help me create a chroot jail for Apache, php and mysql

linux-ka wrote:

don't you have to chroot first into that jail in order to start the apache server?

That makes sense. Also check the relevant logs. Have you bound the apache daemon to a specific IP?


neutral

Offline

#5 2010-10-14 12:03:40

arkara
Member
Registered: 2010-05-02
Posts: 35

Re: Help me create a chroot jail for Apache, php and mysql

linux-ka wrote:

don't you have to chroot first into that jail in order to start the apache server?


I did chroot in the jail first.

Offline

#6 2010-10-14 12:05:03

arkara
Member
Registered: 2010-05-02
Posts: 35

Re: Help me create a chroot jail for Apache, php and mysql

sand_man wrote:

That makes sense. Also check the relevant logs. Have you bound the apache daemon to a specific IP?

How can i see that? I mean the ip should be the ip the hosting machine.

Offline

Board footer

Powered by FluxBB