[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Build apache server (for webmenu) with cookie auth and remote cgi



 
    
Build apache server (for webmenu) with cookie auth and remote cgi
-----------------------------------------------------------------

1. Generic
==========

[siwc@tittat apache_1.3.26]$ INCLUDES="-I/servers/http/openssl/include -I/servers/http/src/ldap/include" LIBS="-L/servers/http/openssl/lib -L/servers/http/src/ldap/lib -lldap -llber" ./configure --prefix=/servers/http/apache_ssl_test_1.3.26 --enable-module=most --activate-module=src/modules/cookie_auth/mod_cookie_auth.c --add-module=src/modules/extra/mod_remote_cgi_client.c

2. add module into src/Configuration and src/Configuration.tmpl files
=====================================================================

[siwc@tittat src]$ pwd
/servers/http/src/apache_1.3.26/src

[siwc@tittat src]$ diff Configuration Configuration.orig
...
474,479d453
< ## Damn damn damn. Apache inverts the module list. SSL must go first to fake
< ## basic authorization (that is, last in this file).
< 
< AddModule modules/ssl/apache_ssl.a
< 
< AddModule modules/cookie_auth/libcookie_auth.a
...

[siwc@tittat src]$ diff Configuration.tmpl Configuration.tmpl.orig
...
474,479d453
< ## Damn damn damn. Apache inverts the module list. SSL must go first to fake
< ## basic authorization (that is, last in this file).
< 
< AddModule modules/ssl/apache_ssl.a
< 
< AddModule modules/cookie_auth/libcookie_auth.a

[siwc@tittat src]$ cat modules/cookie_auth/Makefile.tmpl

LIB=libcookie_auth.$(LIBEXT)

OBJS=\
     mod_cookie_auth.o radius.o md5.o
OBJS_PIC=\
     mod_cookie_auth.lo radius.lo md5.lo

all: lib

lib: $(LIB)

libcookie_auth.a: $(OBJS)
        rm -f $@
        ar cr $@ $(OBJS)
        $(RANLIB) $@

libcookie_auth.so: $(OBJS_PIC)
        rm -f $@
        $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS_PIC) $(LIBS_SHLIB)

.SUFFIXES: .o .lo

.c.o:
        $(CC) -c $(INCLUDES) $(CFLAGS) $<

.c.lo:
        $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $< && mv $*.o $*.lo

clean:
        rm -f $(OBJS) $(OBJS_PIC) $(LIB)

distclean: clean
        -rm -f Makefile

# We really don't expect end users to use this rule.  It works only with
# gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
# using it.
depend:
        cp Makefile.tmpl Makefile.tmpl.bak \
            && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
            && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
            && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
                   -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
                > Makefile.tmpl \
            && rm Makefile.new

#Dependencies

$(OBJS) $(OBJS_PIC): Makefile

# DO NOT REMOVE
mod_cookie_auth.o: mod_cookie_auth.c radius.h $(INCDIR)/httpd.h \
 $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
 $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
 $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
 $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
 $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/explain.h \
 $(INCDIR)/http_log.h $(INCDIR)/http_vhost.h \
 $(INCDIR)/http_request.h
radius.o: radius.c radius.h $(INCDIR)/httpd.h \
 $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
 $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
 $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
 $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
 $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/explain.h \
 $(INCDIR)/http_log.h $(INCDIR)/http_main.h \
 $(INCDIR)/util_date.h $(INCDIR)/multithread.h \
 $(INCDIR)/ap_md5.h
md5.o: md5.c md5.h $(INCDIR)/httpd.h \
 $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
 $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
 $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
 $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
 $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/explain.h \
 $(INCDIR)/http_log.h $(INCDIR)/http_main.h

[siwc@tittat apache_1.3.26]$ LIBS="-L/servers/http/openssl/lib -L/servers/http/src/ldap/lib -lldap -llber" INCLUDES="-I/servers/http/openssl/include -I/servers/http/src/ldap/include" ./configure --prefix=/servers/http/apache_ssl_test_1.3.26 --enable-module=most --add-module=src/modules/extra/mod_remote_cgi_client.c

Google