Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-12-2005, 08:34 PM   #1
Registered: Mar 2004
Location: USA
Distribution: Ubuntu
Posts: 291

Rep: Reputation: 30
Chrooting Apache, JAIL is giving me problems

PHP Warning: main(): php_network_getaddresses: getaddrinfo failed: Name or service not known in

Dear members

I use Plesk and I use Apache, CGI, MySQL and PHP

I was able to use mod-security, to use a Chroot directory, everything works ok, exept that in some sites I need to include CGI scripts

so the call will be like this:


Whenever I run Apache with mod-security but WITHOUT the CHROOT option, everything works ok

When I run the Chroot option, everything works ok, exept that in PHP, I cannot fopen, include... external URLs

Seems like PHP isn't able to do reverse DNS or something similar

I went to the mod-security site, and read EVERYTHING, the first 3 chapters of the Apache Security book.

I've followed all the instructions, and I created a /chroot directory, with all the libraries copied into /chroot/lib

The libraries that are needed by /sbin/httpd and, I copied them all

I even copied the /chroot/etc/resolv.conf file, and the libraries needed by the /bin/host programs, along with the program itself

So right now I'm able to do this:

chroot /chroot /bin/host

and it outputs: is an alias for xx.xx.xx.xx.

I restart apache, but still, I can't include the CGI script form my PHP script

I am trying to load a CGI script from in a script located at the same site:

I can't include it like this:


because the cgi script won't run

Any suggestions will be highly appreciated
Old 08-08-2005, 10:14 AM   #2
Registered: Jun 2005
Posts: 43

Rep: Reputation: 15
Just a suggestion, is putting the scripts inside the chroot jail not an option?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chrooting Apache 2? darklogik_org Linux - Software 0 02-10-2004 03:34 AM
Apache Jail with SSL, PHP and MySQL dai Linux - Security 3 07-05-2003 06:35 AM
chrooting apache with php support - sendmail problems markus1982 Linux - Security 9 01-29-2003 05:13 AM
chrooting apache v2 (php, ssl, perl support) ; perl configuration markus1982 Linux - Security 3 01-26-2003 06:15 PM
Problems chrooting :( rverlander Linux From Scratch 1 07-21-2002 06:44 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration