SHARE
Facebook X Pinterest WhatsApp

Suexec and Apache: A Tutorial Page 9

Written By
thumbnail Ken Coar
Ken Coar
Jul 20, 2010
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



If you have a particular Apache-related topic that you’d like covered in a
future article in this column, please let me know; drop me an email at coar@Apache.Org>. I do read and
answer my email, usually within a few hours (although a few days may pass if
I’m travelling or my mail volume is way up). If I don’t respond within what
seems to be a reasonable amount of time, feel free to ping me again.

About the Author

Ken Coar is a member of the Apache Group
and a director and vice president of the Apache Software Foundation. He is also a core
member of the
Jikes
open-source Java compiler project
, a contributor to the
PHP project, the author of
Apache Server for Dummies,
and a contributing author to Apache
Server Unleashed
. He can be reached via email at coar@apache.org>.

Appendix: Building Apache at Lightspeed

If you need to build Apache from source in order to add or change the
suexec parameters, you can use the following commands as a
quick-start. You should download the latest released version of the Apache
tarball and unpack it into a working directory. The top-level directory will
then be ./apache-1.3, which matches assumption #1 described earlier.

    % cd ./apache-1.3
    % env CC=gcc CFLAGS="-O2 -Wall" 
    > ./configure --enable-shared=max --enable-module=most 
    >   --with-layout=Apache --prefix=/usr/local/web/apache 
    >   --with-port=80 
    >   --enable-suexec 
    >   --suexec-caller=nobody 
    >   --suexec-docroot=/usr/local/web 
    >   --suexec-umask=022
    Configuring for Apache, Version 1.3.12-dev
     + using installation path layout: Apache (config.layout)
     + Warning: You have enabled the suEXEC feature. Be aware that you need
     + root privileges to complete the final installation step.
    Creating Makefile
    Creating Configuration.apaci in src
        [more configuration output]
    % make
        [lots of compilation output]
    % make install
        [lots more output describing file placement]
    % /usr/local/web/apache/bin/apachectl start
     

If you didn't encounter any errors, you should now have a working Apache
installation in the location that matches assumption
#2
described earlier. It's been built to include suexec, and
you should verify that this is the case:

    % /usr/local/web/apache/bin/httpd -l
    Compiled-in modules:
      http_core.c
      mod_so.c
    suexec: enabled; valid wrapper /usr/local/web/apache/bin/suexec
     

It's far beyond the scope of this article to give any more information
about building Apache. If you'd like to see an article in this column about the
details of building Apache, let me know.

thumbnail Ken Coar

Ken Coar is a ServerWatch contributor.

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
What Is a Network Policy Server (NPS)? | Essential Guide
Virtual Servers vs. Physical Servers: Comparison and Use Cases
Ray Fernandez
Nov 14, 2023
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.