The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enabling mod_headers?

Discussion in 'General Discussion' started by fog, Mar 10, 2003.

  1. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    Someone on my machine wants mod_headers setup. How do I do this?

    Thanks!
     
  2. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    Someone please respond.
     
  3. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    You will have to recompile Apache.

    Nick, if you read this, maybe you could include it in the next buildapache release.
     
  4. sanket

    sanket Member

    Joined:
    Dec 17, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    heres a simple way

    Hi
    I was trying to add mod_headers to my apache but could not get any help here.
    I did a lot of reasearcha and found a simple way which does not require recompiling apache.


    $:cd /home/cpapachebuild/buildapache/apache_1.3.29/src/modules/standard
    $: /usr/local/apache/bin/apxs -c mod_headers.c
    $:/usr/local/apache/bin/apxs -i -a -n headers mod_headers.so

    this will compile and add the header to the apache along with adding the lines to httpd.conf

    check httpd.conf by running
    httpd configtest
    If everything is fine
    restart httpd by giving the command
    thats it! Now mod_headers will work with your apache.

    Generic Approach to add modules
    Generic Instructions
    Build and install a third-party Apache module, say mod_foo.c, into its own DSO mod_foo.so outside of the Apache source tree:
    Build and install via apxs: $ cd /path/to/3rdparty
    $ apxs -c mod_foo.c
    $ apxs -i -a -n foo mod_foo.so
     
  5. ChrisB2

    ChrisB2 Registered

    Joined:
    Aug 26, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi sanket,

    Thanks for posting your information on this.

    I'm trying to do the same, only I have no "apache_1.3.29" directory in the "buildapache" tree. Instead, I have this:
    Code:
    drwxr-xr-x    8 root     root         4096 Feb  8 14:04 ./
    drwxr-xr-x    3 root     root         4096 Feb  8 14:03 ../
    -rw-r--r--    1 root     root         1383 Oct  4  2002 apache_1.3.29-nouids
    -rw-r--r--    1 root     root         9416 Jul 19  2003 apache_1.3.29-php-suexec-mod_ssl-patch
    -rw-r--r--    1 root     root         9599 Jul 19  2003 apache_1.3.29-php-suexec-patch
    -rw-r--r--    1 root     root        13365 May 12  2004 apache_1.3.31-php-suexec-mod_ssl-patch
    -rw-r--r--    1 root     root        13119 Jun  2  2004 apache_1.3.31-php-suexec-patch
    -rw-r--r--    1 root     root        13365 May 12  2004 apache_1.3.32-php-suexec-mod_ssl-patch
    -rw-r--r--    1 root     root        13119 Jun  2  2004 apache_1.3.32-php-suexec-patch
    -rw-r--r--    1 root     root        13365 May 12  2004 apache_1.3.33-php-suexec-mod_ssl-patch
    -rw-r--r--    1 root     root        13119 Jun  2  2004 apache_1.3.33-php-suexec-patch
    drwxr-xr-x    2 root     root         4096 Nov  7 22:41 apache2-fp/
    -rw-r--r--    1 root     root         1973 Jul 20  2003 apache-child.patch
    -rw-r--r--    1 root     root          515 Feb 23  2003 apache.fdsetsize.patch
    drwxr-xr-x    2 root     root         4096 Jan 30  2004 Attic/
    -rwxr-xr-x    1 root     root          104 Jul 16  2004 bs*
    -rwx------    1 root     root        13973 Jan 24 21:35 buildapache*
    drwxr-xr-x    2 root     root         4096 Feb  8 14:15 build-log/
    -rw-r--r--    1 root     root         1353 Jul 10  2003 buildmodlist
    -rwxr-xr-x    1 root     root        20180 Feb  8 14:04 buildscript*
    -rwx------    1 root     root         4341 Aug  6  2004 callbacklog*
    -rwxr-xr-x    1 root     root          603 Jan 11 00:59 checkapsetup*
    -rwxr-xr-x    1 root     root          393 Jul 20  2004 checkdeadperlso*
    -rwxr-xr-x    1 root     root          101 Aug 25 20:49 checkdirs*
    -rwxr-xr-x    1 root     root          655 Jul 16  2004 checkkernelheaders*
    -rwxr-xr-x    1 root     root         1840 Oct 24 00:48 checkrpms*
    -rw-------    1 root     root         2423 Jan 24 21:34 config.pl
    -rwx------    1 root     root         3047 Jul 12  2003 editlib.pl*
    -rw-r--r--    1 root     root        36699 Jul 10  2003 expat.h
    -rwx------    1 root     root          349 Jul 15  2004 fetchfile*
    -rw-r--r--    1 root     root        33332 Jun  8  2004 fp-patch-apache_1.3.31-5.0
    -rw-r--r--    1 root     root         1131 Oct 23  2002 gd.diff
    -rwx------    1 root     root          123 Jul 16  2004 hasjavac*
    -rwxr-xr-x    1 root     root         6959 Jul 10  2003 htmlgcc*
    -rw-r--r--    1 root     root        34217 Mar 20  2002 httpd.conf.tmpeditlib
    -rwxr-xr-x    1 root     root         2112 Oct 10 06:42 installjava*
    -rwx------    1 root     root          452 Jul 12  2003 killmoddav*
    -rw-r--r--    1 root     root          885 Mar 10  2004 libssl64.patch
    -rw-r--r--    1 root     root          295 May 26  2001 limit.patch
    drwxr-xr-x    2 root     root         4096 Jan 24 21:35 lxdialog/
    -rw-------    1 root     root            0 Jan 24 21:34 lxmenu
    -rw-r--r--    1 root     root          784 Jun 16  2004 mailman-suexec.patch
    -rw-------    1 root     root           57 Jul 17  2002 Makefile
    -rw-r--r--    1 root     root          621 Nov 11  2002 mbstring.patch
    -rw-r--r--    1 root     root          357 Oct 21 23:16 ming.patch
    -rw-r--r--    1 root     root        31912 Nov  7 19:11 mod_frontpage.c
    -rw-r--r--    1 root     root          564 Nov  7 19:11 mod_frontpage.diff
    -rwxr-xr-x    1 root     root         1282 Dec  8  2003 modgzipconfmods*
    drwxr-xr-x    2 root     root         4096 Dec 20 17:39 modules/
    -rwxr-xr-x    1 root     root          307 Aug 19  2003 nomodattach*
    -rwxr-xr-x    1 root     root          331 Jul 24  2003 nomodauthmysql*
    -rwxr-xr-x    1 root     root          151 Jul 12  2004 nomodfrontpage*
    -rwxr-xr-x    1 root     root          295 Jul 12  2003 nomodgzipconfmods*
    -rwxr-xr-x    1 root     root          293 Jul 12  2004 nomodperl*
    -rwxr-xr-x    1 root     root          313 Jul 24  2003 nomodroaming*
    -rwx------    1 root     root          296 Jul 16  2004 nophp4*
    -rwx------    1 root     root          296 Jul 16  2004 nophp5*
    -rwx------    1 root     root          300 Jul 12  2003 nophpsuexecmodconf*
    drwxr-xr-x   17 1003     1003         4096 Feb  8 14:12 php-4.3.10/
    -rw-r--r--    1 root     root      4892209 Dec 14 17:59 php-4.3.10.tar.gz
    -rw-r--r--    1 root     root          672 Jul 16  2004 php-curlfix.patch
    -rw-r--r--    1 root     root          838 Jul 16  2004 php-gdfix.patch
    -rw-r--r--    1 root     root          548 Jul  8  2003 php-suexec-4.3.2.patch
    -rwx------    1 root     root          995 Jul 16  2004 phpsuexecmodconf*
    -rwxr-xr-x    1 root     root          888 Jul 12  2004 regsrep.pl*
    -rwxr-xr-x    1 root     root         3834 Aug  5  2004 reporterrors*
    -rwx------    1 root     root          560 Jul 16  2004 restorevhosts*
    -rwx------    1 root     root          756 Jul 16  2004 savevhosts*
    -rw-r--r--    1 root     root          234 Aug  5  2003 suexec+httpsvar.patch
    -rw-r--r--    1 root     root         1140 Sep  3  2003 suexec-httpusergroupallow.patch
    -rw-r--r--    1 root     root         3006 Jun 16  2004 suexec.patch
    -rw-r--r--    1 root     root         1666 Sep  3  2003 suexec+php-httpusergroupallow.patch
    -rw-r--r--    1 root     root         3846 Jun 16  2004 suexec+php.patch
    
    The obvious one to look in is "modules" I suppose, but this contains:
    Code:
    drwxr-xr-x    2 root     root         4096 Dec 20 17:39 ./
    drwxr-xr-x    8 root     root         4096 Feb  8 14:04 ../
    -rwx------    1 root     root          976 Jan  5 09:16 apache*
    -rw-------    1 root     root          838 Jan 11 00:49 apache_conf_prep
    -rw-r--r--    1 root     root          123 Oct 29 11:31 apache_post_prep
    -rw-------    1 root     root         3363 Jan 14 08:12 apache_prep
    -rwx------    1 root     root          123 Jul 15  2004 attach*
    -rw-------    1 root     root           47 Jul 15  2004 attach_prep
    -rwx------    1 root     root          143 Jul 15  2004 auth_mysql*
    -rw-------    1 root     root          125 Jul 15  2004 auth_mysql_prep
    -rwx------    1 root     root          122 Jul 15  2004 bwprotect*
    -rw-------    1 root     root           50 Jul 15  2004 bwprotect_prep
    -rwx------    1 root     root           88 Jul 15  2004 dav*
    -rw-------    1 root     root          346 Jul 15  2004 dav_prep
    -rwx------    1 root     root          127 Jul 15  2004 fdsetsize*
    -rw-------    1 root     root          338 Nov  7 18:32 fdsetsize_prep
    -rwx------    1 root     root          133 Jul 15  2004 fileprotect*
    -rw-------    1 root     root          119 Jul 15  2004 fileprotect_prep
    -rwx------    1 root     root          112 Nov  7 18:30 frontpage*
    -rw-------    1 root     root         3731 Jan 18 14:19 frontpage_prep
    -rwx------    1 root     root          104 Jul 15  2004 gzip*
    -rw-------    1 root     root          383 Jul 15  2004 gzip_prep
    -rwx------    1 root     root          103 Jul 15  2004 limit*
    -rw-------    1 root     root          159 Jan 11 00:49 limit_prep
    -rwx------    1 root     root          148 Jul 15  2004 perl*
    -rwx------    1 root     root         4452 Jan 24 21:34 php*
    -rw-------    1 root     root         9108 Jan  5 09:37 php_prep
    -rwx------    1 root     root          120 Jul 15  2004 roaming*
    -rw-------    1 root     root           54 Jul 15  2004 roaming_prep
    -rwx------    1 root     root           86 Jul 15  2004 ssl*
    -rw-------    1 root     root         2106 Jan 11 00:49 ssl_prep
    -rwx------    1 root     root          103 Jul 15  2004 throttle*
    -rwx------    1 root     root           49 Jul 15  2004 throttle_prep*
    
    Any ideas to where this pesky mod_headers.c and .so files might otherwise be?

    Cheers

    Chris
     
  6. sanket

    sanket Member

    Joined:
    Dec 17, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi
    basically the folder
    src/modules/standard

    represents the source files of your apache build.
    Sp u need to find out where the apache source is stored on ur server

    if you are using cpanel uit will generally be

    /home/cpapachebuild/buildapache/apache_1.3.xx/src/modules/standard


    Once you find the apache source files you van use the method described by me.

    Hope that helps

    Regards
    Sanket Gupta
     
  7. joecool1001

    joecool1001 Member

    Joined:
    Jun 20, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    This is what I have in /home/cpapachebuild/buildapache/

    (null) ./
    (null) ../
    (null) apache_1.3.29-nouids
    (null) apache_1.3.29-php-suexec-mod_ssl-patch
    (null) apache_1.3.29-php-suexec-patch
    (null) apache_1.3.31-php-suexec-mod_ssl-patch
    (null) apache_1.3.31-php-suexec-patch
    (null) apache_1.3.32-php-suexec-mod_ssl-patch
    (null) apache_1.3.32-php-suexec-patch
    (null) apache_1.3.33-amd64regex-patch
    (null) apache_1.3.33-php-suexec-mod_ssl-patch
    (null) apache_1.3.33-php-suexec-patch
    (null) apache2-fp/
    (null) apache-child.patch
    (null) apache.fdsetsize.patch
    (null) Attic/
    (null) bs*
    (null) buildapache*
    (null) build-log/
    (null) buildmodlist
    (null) buildscript*
    (null) callbacklog*
    (null) checkapsetup*
    (null) checkdeadperlso*
    (null) checkdirs*
    (null) checkkernelheaders*
    (null) checkmysqli*
    (null) checkrpms*
    (null) config.pl
    (null) editlib.pl*
    (null) expat.h
    (null) fetchfile*
    (null) fp-patch-apache_1.3.31-5.0
    (null) gd.diff
    (null) hasjavac*
    (null) htmlgcc*
    (null) httpd.conf.tmpeditlib
    (null) installjava*
    (null) killmoddav*
    (null) libmcrypt-2.5.7/
    (null) libmcrypt-2.5.7.tar.gz
    (null) libssl64.patch
    (null) limit.patch
    (null) lxdialog/
    (null) lxmenu
    (null) mailman-suexec.patch
    (null) Makefile
    (null) mbstring.patch
    (null) ming.patch
    (null) mod_frontpage.c
    (null) mod_frontpage.diff
    (null) modgzipconfmods*
    (null) modules/
    (null) nomodattach*
    (null) nomodauthmysql*
    (null) nomodfrontpage*
    (null) nomodgzipconfmods*
    (null) nomodperl*
    (null) nomodroaming*
    (null) nophp4*
    (null) nophp5*
    (null) nophpsuexecmodconf*
    (null) php-4.3.11/
    (null) php-4.3.11.tar.gz
    (null) php-curlfix.patch
    (null) php-gdfix.patch
    (null) php-lib64.patch
    (null) phpsetup*
    (null) php-suexec-4.3.2.patch
    (null) phpsuexecmodconf*
    (null) regsrep.pl*
    (null) reporterrors*
    (null) restorevhosts*
    (null) savevhosts*
    (null) suexec+httpsvar.patch
    (null) suexec-httpusergroupallow.patch
    (null) suexec.patch
    (null) suexec+php-httpusergroupallow.patch
    (null) suexec+php.patch
     
  8. Nodren

    Nodren Registered

    Joined:
    Oct 24, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    ok, i had the same problem with the apache folder not showing up either. so to fix it, you'll have to restart apache.

    but goto the Apache Update page in WHM, hit the "Load Previous Config" button, then scroll down to the bottom, and uncheck "Skip Apache Build if up to date"

    then "Start Build" after everything recompiles and everything, your server should be compiled just as it was last time with apache update, but it will now have the source folder in the spot stated from before
     
Loading...

Share This Page