Results 1 to 25 of 25
  1. #1
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032

    httpd.conf question

    Hello,

    Is it possible to tell the httpd.conf for a particular site when it streams a html file it would add something to the top of the code?

    Like

    <Directory /home/.sites/143/site2/web>
    AllowOverride All
    Options All
    Action text/html "include something"
    </Directory>


    Thanks for the advice
    -=- GQ Hong -=-
    GalacNet WebMaster

  2. #2
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Maybe you could use mod_layout for this and use it only for header wrap?

    Syntax example here:

    http://www.fnal.gov/docs/products/mod_layout/

    (it inserts a footer but enough to illustrate, I believe)

    Directives here:

    http://www.fnal.gov/docs/products/mo.../faq.html#_1_9

    I think this could fit your purpose nicely.

  3. #3
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    yes, but I am having problems installing and activating mod_layout...
    -=- GQ Hong -=-
    GalacNet WebMaster

  4. #4
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Hm... what kind of problems? Does it get past the configure and make or do you get the problems there?

  5. #5
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    When trying the rpms, it doesn't seem to ahve any for version 2.0.52 on RH9
    And so I tried to do a makefile myself but then there is no special.mk to continue.... I uncommented the line and then I got
    apxs -c mod_layout.c utility.c layout.c
    apxs:Error: /usr/bin/apr-config not found!.
    make: *** [mod_layout.so] Error 1

    When searching in the server i founf the mod_layout.so in the modules folder and tried to add it to the httpd.conf but the webserver starts with a problem
    Starting httpd: httpd: module "mod_layout.c" is not compatible with this version of Apache (found 20020628, need 20020903).
    Please contact the vendor for the correct version.
    Any ideas?
    -=- GQ Hong -=-
    GalacNet WebMaster

  6. #6
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    It looks like you are using ensim. Becare what you play with. You could easily cause alot of problems
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  7. #7
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    I am actually running RH9 under the BlueQuartz with Apache 2.0.52
    Would that be difficult to load the mod_layout.so module?
    -=- GQ Hong -=-
    GalacNet WebMaster

  8. #8
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Have you tried compiling the mod_layout 4.01 from the Apache 2.x specific source?

    http://tangent.org/index.pl?lastnode_id=362&node_id=374

    The install procedure is pretty simple and this should work no problem.

    Note: In INSTALL you are instructed to add Apache 2.0 to your $PATH:

    First, make sure Apache 2.0 is in your path (probably means adding /usr/local/apache2/bin to your PATH).
    However, if you run into problems with Makefile, just watch which files it can't find. Then do a locate <FILENAME> in your shell which will give you the path to the filename you need for ex. special.mk.

    Then edit the Makefile using vi, pico, nano whatever you use, save it and try again.

    There are several paths in Makefile which you can adjust this to fit your specific configuration (that's one of the advantages of compiling from src - you can edit files):

    top_srcdir=/usr/local/apache2
    top_builddir=/usr/local/apache2
    include /usr/local/apache2/build/special.mk

    # the used tools
    APXS=/usr/local/apache2/bin/apxs
    Last edited by SupaDucta; 05-28-2005 at 12:19 PM.

  9. #9
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    Yes I tried but where am I going to get a special.mk file??
    -=- GQ Hong -=-
    GalacNet WebMaster

  10. #10
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Login to shell and type:

    locate special.mk

    it will echo the path to few of them - use the one begginning with /usr/local, and type it here or edit the makefile paths.

  11. #11
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    Ah getting somewhere

    /usr/sbin/apxs -c mod_layout.c utility.c layout.c
    apxs:Error: /usr/bin/apr-config not found!.
    make: *** [mod_layout.so] Error 1
    Now I just need to find apr-config and install it on the server am I right?
    -=- GQ Hong -=-
    GalacNet WebMaster

  12. #12
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Where is your Apache?

    /usr/local/apache ?

    If it is, edit those paths in Makefile to be:


    top_srcdir=/usr/local/apache
    top_builddir=/usr/local/apache
    include /usr/local/apache/build/special.mk

    # the used tools
    APXS=/usr/local/apache/bin/apxs


    and try again.

  13. #13
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    Here are my variables

    builddir=$(shell pwd)
    top_srcdir=/usr/lib/httpd
    top_builddir=/usr/lib/httpd
    include /usr/lib/httpd/build/special.mk

    # the used tools
    APXS=/usr/sbin/apxs
    -=- GQ Hong -=-
    GalacNet WebMaster

  14. #14
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Wrong.

    Where is your Apache server root ?

    Is it in /usr/local/apache?

  15. #15
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Please paste me the output of:

    locate special.mk

  16. #16
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    The output is

    /usr/lib/httpd/build/special.mk
    -=- GQ Hong -=-
    GalacNet WebMaster

  17. #17
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    That's it?

    Try:

    cd /
    updatedb
    locate special.mk


    Should echo something like:

    /usr/local/apache/build/special.mk
    /usr/lib/httpd/build/special.mk
    /usr/src/redhat/BUILD/httpd-2.0.52/build/special.mk
    Where is the httpd.conf your Apache uses?

  18. #18
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    Still the same.

    My conf files are at

    /etc/httpd/conf
    -=- GQ Hong -=-
    GalacNet WebMaster

  19. #19
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    I got it to install!!!
    Needed the apr-0.9.5-0.2.i386.rpm

    But then it stalls on the "make install"

    make[1]: Entering directory `/home/workbin/mod_layout4'
    /bin/sh: line 1: /usr/lib/httpd: is a directory
    make[1]: *** [install-modules] Error 126
    make[1]: Leaving directory `/home/workbin/mod_layout4'
    make: *** [install-recursive] Error 1
    -=- GQ Hong -=-
    GalacNet WebMaster

  20. #20
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Hmmm... try the following:

    First locate apr-config and copy it to /usr/bin.

    cp OLDPATH/apr-config /usr/bin

    Then do a ls -al /usr/bin/apr-config see if it has the following attributes:

    -rwxr-xr-x

    Then try running mod_layout make again.

  21. #21
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    Originally posted by SupaDucta
    Hmmm... try the following:

    First locate apr-config and copy it to /usr/bin.

    cp OLDPATH/apr-config /usr/bin

    Then do a ls -al /usr/bin/apr-config see if it has the following attributes:

    -rwxr-xr-x

    Then try running mod_layout make again.

    After installing the APR tools it could do the make and here are the values
    /usr/sbin/apxs -c mod_layout.c utility.c layout.c
    /usr/lib/apr/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -march=i386 -mcpu=i686 -I/usr/kerberos/include -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/apr-0 -c -o mod_layout.lo mod_layout.c && touch mod_layout.slo
    /usr/lib/apr/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -march=i386 -mcpu=i686 -I/usr/kerberos/include -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/apr-0 -c -o utility.lo utility.c && touch utility.slo
    /usr/lib/apr/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -march=i386 -mcpu=i686 -I/usr/kerberos/include -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/apr-0 -c -o layout.lo layout.c && touch layout.slo
    /usr/lib/apr/build/libtool --silent --mode=link gcc -o mod_layout.la -rpath /usr/lib/httpd/modules -module -avoid-version layout.lo utility.lo mod_layout.lo
    But then a make install fails...
    I tried to do a make install directly after a "make" and also tried a make clean first, but then both failed to install...
    -=- GQ Hong -=-
    GalacNet WebMaster

  22. #22
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    Wait.... it worked
    I don't know what.... but then it installed and apache booted with no problems!!

    now to test the variables

    thank you so much for your patience
    -=- GQ Hong -=-
    GalacNet WebMaster

  23. #23
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Take a look at Apache's error_log to see if there are any boot errors.

    When you do configurations in httpd.conf, before restarting Apache, do:

    apachectl configtest

    It will echo if the syntax is right or wrong

    To config mod_layout use the links I have pasted in the beginning.


  24. #24
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    Yes the syntax is ok, just that BlueQuartz seem to be unable to set the virtualhost port correctly, but its just some error messages nothing much goes wrong in the user end

    Thanks again
    -=- GQ Hong -=-
    GalacNet WebMaster

  25. #25
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    No problem, glad you got it to work. I believe you will be able to make some workaround around this BlueQuartz limitation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •