Web Development Blog

24K Design Studio :: Blog :: CentOS5 Recompile Apache to Change Suexec Docroot to /home
Author:
Password:
CentOS5 Recompile Apache to Change Suexec Docroot to /home
06:42, 07 May, 2011
by James

In order to change PHP execution mode to CGI wrapper for better control for shared hosting, we need to recompile apache to change the Suexec default directory. Below are the steps:

 

wget http://mirror.centos.org/centos/5/updates/SRPMS/httpd-2.2.3-53.el5.centos.1.src.rpm

useradd mockbuild


rpm -Uvh httpd-2.2.3-53.el5.centos.1.src.rpm

nano /usr/src/redhat/SPECS/httpd.spec

change %define contentdir /var/www to %define contentdir /home

You may need to install some missing packages, in my case:
yum install xmlto pcre-devel distcache-devel

rpmbuild -bb /usr/src/redhat/SPECS/httpd.spec

rpm -iUvh --replacepkgs --nodeps --force /usr/src/redhat/RPMS/x86_64/httpd-2.2.3-53.1.x86_64.rpm /usr/src/redhat/RPMS/x86_64/httpd-devel-2.2.3-53.1.x86_64.rpm /usr/src/redhat/RPMS/x86_64/httpd-manual-2.2.3-53.1.x86_64.rpm /usr/src/redhat/RPMS/x86_64/mod_ssl-2.2.3-53.1.x86_64.rpm

Reply:
Your name:
Only visible to the author.

Tell us you are not a robot. What is captcha1captchaOcaptcha2 =

Reply
#1
oomhhvls
05:03, 25 Nov, 2015
 
1
Reply
Your name:
Only visible to the author.

Tell us you are not a robot. What is captcha1captchaOcaptcha2 =

Reply
View the latest 5 entries.