LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 07-12-2005, 09:34 PM   #1
xbaez
Member
 
Registered: Mar 2004
Location: USA
Distribution: Ubuntu
Posts: 284

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:

@include("http://www.mysite.com/cgi-bin/coranto/shownews.cgi?id=DLSMSMEMLLFSOWLSF");

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 libphp4.so, 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 www.google.com

and it outputs:
www.google.com 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 www.mysite.com in a script located at the same site: www.mysite.com

I can't include it like this:

include("/var/www/site.com/cgi-bin/coranto/shownews.cgi?id=DLSMSMEMLLFSOWLSF");

because the cgi script won't run

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

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

Regards
 
  


Reply


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 04:34 AM
Apache Jail with SSL, PHP and MySQL dai Linux - Security 3 07-05-2003 07:35 AM
chrooting apache with php support - sendmail problems markus1982 Linux - Security 9 01-29-2003 06:13 AM
chrooting apache v2 (php, ssl, perl support) ; perl configuration markus1982 Linux - Security 3 01-26-2003 07:15 PM
Problems chrooting :( rverlander Linux From Scratch 1 07-21-2002 07:44 AM


All times are GMT -5. The time now is 08:56 PM.

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