Rebuilding suexec with Different Options on Ubuntu

The following is for my own reference, borrowed from there and duplicated here because the original blog looks inactive and a fine candidate for deletion next time their domain or hosting will expire. No questions on this please, this is not my area of expertise at all.

Backup the current suexec. Then download stuff and go into the newly created directory:

  1. cd /usr/src
  2. apt-get build-dep apache2.2-common
  3. apt-get source apache2.2-common
  4. cd apache2-2.2.3/

Edit the build rules and change the suexec settings:

  1. vi debian/rules

Near the top are located the defaults, AP2_COMMON_CONFARGS. Find the references to suexec and modify. For instance:

  1. --with-suexec-docroot=/home/hosting \

Increment the build number and build notes with comments telling when and why, with dch (needs devscripts) :

  1. dch -i

Then build the package :

  1. dpkg-buildpackage

Now, in /usr/src/ we have all the .deb files we need to install. We dpkg -i the one we want (suexec is part of apache2.2-common and needs apache2.2-utils). All done.

Check new suexec compile options :

  1. /usr/lib/apache2/suexec2 -V

6 comments

  1. armouf

    Cool !

    I didnt get a word of what you wrote but im sure it rox ^^

  2. caker

    For anyone following this, after installing my newly created package, I had to correct the suexec binary permissions with:

    chmod 4750 /usr/lib/apache2/suexec

    Thanks!
    -Chris

  3. Mebus

    Great ! Also worked on Debian 4.0 !!

    Mebus

  4. Happy my life » suexec??????????

    […] Ubuntu???Suexec?Docroot?/var/www????????? ???????/home/foo/public_html??suexec?????????,suexec???????????????? Rebuilding suexec with Different Options on Ubuntu « planetOzh??????? […]

  5. Tadaa

    Bonjour,

    Sa fonctionne parfaitement bien !

    Merci pour votre solution.

  6. Die Ketzerei » ¿Demasiado tonto soy?

    […] instalar un sistema de administración de hosts virtual, es más difícil que instalar Gentoo (link a una correción que debí de […]

Comments are closed.