Forum Moderators: phranque
quote:
-------------------------
# service httpd stop
# ./configure --prefix=/usr/local/httpd --enable-deflate --enable-so --enable-mods-shared=all --enable-suexec --with-suexec-bin=/usr/local/httpd/bin/ --with-suexec-caller=nobody --with-suexec-docroot=/usr/local/httpd/htdocs/ --with-suexec-logfile=/usr/local/httpd/logs/suexec_log
# make
# make install
-------------------------
(caller=nobody) :arrow: it's the user under wich my Apache's working
All is done and no errors given
so i test if suexec is on by typing :
quote:
-------------------------
# ls -alF /usr/local/httpd/bin/suexec
-rwsr-xr-x 1 root root 48903 mar 24 20:21 /usr/local/httpd/bin/suexec*
-------------------------
it's ok.
but in the doc of httpd ,it says that i must have a [notice] in the error log of apache saying that suexec was successfully charged :
quote:
-------------------------
# cat /usr/local/httpd/logs/error_log
[Wed Mar 24 20:21:26 2004] [notice] Digest: generating secret for digest authentication ...
[Wed Mar 24 20:21:26 2004] [notice] Digest: done
[Wed Mar 24 20:21:27 2004] [notice] Apache/2.0.48 (Unix) DAV/2 PHP/4.3.4 configured -- resuming normal operations
-------------------------
there's no notice!
another test ,here's the built in modules of my apache :
quote:
-------------------------
# /usr/local/httpd/bin/apachectl -l
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
-------------------------
there's no suexec
anyone got a solution for me?
thanks anyway
1) Download apache2-x.x.x.src.rpm (notice this is a src RPM)
2) rpm -ivh apache2-x.x.x.src.rpm
3) vi /usr/src/redhat/SPECS/httpd.spec (or wherever this file ends up being located)
4) Add the suexec parameters (reply if you need help finding them in the file... should be easy)
5) Also change the top few variables; at least the first one where it says /var/www to /home or wherever you want your server root to be.
6) rpmbuild -bs /usr/src/redhat/SPECS/httpd.spec
7) cd /usr/src/redhat/SRPMS/ (Should have a new source rpm there)
8) rpmbuild --rebuild /usr/src/redhat/SRPMS/whatever.rpm (where whatever is the RPM found there. If no errors: should be a new RPM in the directory shown in step 9.)
9) cd /usr/src/redhat/RPMS/i386/ ; ls -l
10) rpm -ivh --replacepkgs --replacefiles apche2-x.x.x.i386.rpm
Now you should be set. You may also want to look for an suexec log to see if its working right. You should also add "SuexecUserGroup username groupname" to your virtual host stanza, where username is the owner of all the files under that document root, and groupname is the group name of all the files under that doc root.
This procedure worked for me and I've used it a couple of times with no problems to speak of.