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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-07-2010, 08:48 AM
|
#1
|
|
Member
Registered: Mar 2010
Posts: 43
Rep:
|
Chrooted apache how to restart?
Code:
Restarting Apache
Once chrooted, Apache cannot access anything located above ChrootDir. For that reason restarting Apache with 'apachectl reload', 'apachectl graceful' or 'kill -HUP apache_pid' will not work as expected. Apache will not be able to read its config file, open logs or load modules (unless you put them inside the jail, but mod_chroot is all about not doing that!). Use 'apachectl stop' followed by 'apachectl start' to restart mod_chroot-enabled Apache.
i tried apache2ctl stop and the result:
httpd (no pid file) not running
after that apache is still working.
OS debian lenny
Last edited by Kraiser10; 04-09-2010 at 08:53 AM.
|
|
|
|
04-08-2010, 02:04 AM
|
#2
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,365
|
Hi,
I guess you have to run these commands from inside the chroot directory
Regards
|
|
|
|
04-08-2010, 07:47 AM
|
#3
|
|
Member
Registered: Mar 2010
Posts: 43
Original Poster
Rep:
|
Only PHP scripts are inside chroot dir.
|
|
|
|
04-08-2010, 07:52 AM
|
#4
|
|
Member
Registered: Feb 2010
Location: Bangalore, India
Distribution: Fedora, Linux Mint 10
Posts: 588
Rep:
|
Quote:
Originally Posted by Kraiser10
Code:
Restarting Apache
Once chrooted, Apache cannot access anything located above ChrootDir. For that reason restarting Apache with 'apachectl reload', 'apachectl graceful' or 'kill -HUP apache_pid' will not work as expected. Apache will not be able to read its config file, open logs or load modules (unless you put them inside the jail, but mod_chroot is all about not doing that!). Use 'apachectl stop' followed by 'apachectl start' to restart mod_chroot-enabled Apache.
i tried apache2ctl stop and the result:
httpd (no pid file) not running
after that apache is still working.
OS debian lenny
|
What is the output of
Just to know if apache is still running, if its not running try starting the service again.
|
|
|
|
04-08-2010, 08:43 AM
|
#5
|
|
Member
Registered: Mar 2010
Posts: 43
Original Poster
Rep:
|
It's still running i can access web throught browser and it's still in top so...
|
|
|
|
04-08-2010, 04:54 PM
|
#6
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,365
|
Quote:
|
Only PHP scripts are inside chroot dir.
|
Then apache is not exactly chrooted. You need to tweak other things also, most significant of them being the PidFile, that is used to start/stop/restart etc httpd.
You can find more details about mod_chroot for apache2 here
Regards
|
|
|
|
04-08-2010, 10:55 PM
|
#7
|
|
Member
Registered: Feb 2010
Location: Bangalore, India
Distribution: Fedora, Linux Mint 10
Posts: 588
Rep:
|
Quote:
Originally Posted by Kraiser10
It's still running i can access web throught browser and it's still in top so...
|
Can you see httpd with pstree or top?
If yes then you will find the pid, kill httpd and then try starting it again. You can also use pidof httpd to determine the pid of httpd.
|
|
|
|
04-09-2010, 07:49 AM
|
#8
|
|
Member
Registered: Mar 2010
Posts: 43
Original Poster
Rep:
|
Oh yeah thanks it worked :-)
|
|
|
|
04-09-2010, 07:54 AM
|
#9
|
|
Member
Registered: Feb 2010
Location: Bangalore, India
Distribution: Fedora, Linux Mint 10
Posts: 588
Rep:
|
Quote:
Originally Posted by Kraiser10
Oh yeah thanks it worked :-)
|
You are welcome, now you can mark the thread as solved.  Have a great day.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:52 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|