|
|
|
|
| Combining RPM Apache with a custom suexec |
|
Problem: Since suexec does not use a configuration file but rather uses compiled-in settings, in certain scenarios it becomes necessary to recompile suexec to change those settings. However, a full recompile of Apache is a complex task.
|
|
Solution: Compile Apache and just copy the suexec file instead of doing a full "make install". Here's the full procedure which worked for me:
1. Download and extract the source file for the Apache version you are running. Don't worry about modules etc, you won't need those.
2. chdir to the directory where you extracted the source
"# cd /usr/src/redhat/SOURCES/apache_1.3.27"
3. Configure the source with respect to suexec. Pay no attention to other Apache settings, we won't be using this httpd binary anyway:
"# ./configure --enable-suexec --suexec-caller=apache --suexec-docroot=/ --suexec-logfile=/var/log/httpd/suexec_log"
4. Compile BUT DO NOT INSTALL Apache!
"# make"
5. Make a backup copy of your original suexec binary:
"# mv /usr/sbin/suexec /usr/sbin/suexec_ORG"
6. Copy the new binary into place:
"# cp ./src/support/suexec /usr/sbin/suexec"
7. Finally, set the correct owhership and permissions:
"# chgrp apache /usr/sbin/suexec"
"# chmod 4510 /usr/sbin/suexec"
8. Watch /var/log/httpd/suexec_log for results as you hit the server
|
|
|
|
|
|
This is free technical advice without any warranties.
Use at your own risk. Solutions offered may not apply to your particular problem at all.
Opinions and views expressed in the articles are the authors' personal
and may not necessarily reflect or coincide with those of Ano-Tech Computers.
We take no responsibility if anything bad happens from following any of
the intructions given. If you don't understand and accept this, please
contact us for personal assistance instead.
To read our full disclaimer, go
here.
We welcome anyone who is willing to contribute to this public knowledge base,
contact siteadmin@atc.no
if you have information you would like to share. The idea is not to replace
the commercial support sites, but to publish those hard-to-find
solutions you've found yourself looking for over and over again.
Show all articles