Correct switch for mod_unique_id?

CiscoMike

Verified User
Joined
Dec 2, 2005
Messages
66
Location
Denver, CO
when editing ap2/configure.apache, what is the right switch to add in order to get mod_unique_id to build? I am failing miserably. I thought it was enable=unique_id but apparently that's not it.

Thanks
 
Thanks SM...last ?

Code:
[root@empire ~]# httpd -l
Compiled in modules:
  core.c
  mod_authn_file.c
  mod_authn_default.c
  mod_authz_host.c
  mod_authz_groupfile.c
  mod_authz_user.c
  mod_authz_default.c
  mod_auth_basic.c
  mod_include.c
  mod_filter.c
  mod_deflate.c
  mod_log_config.c
  mod_logio.c
  mod_env.c
  mod_headers.c
  [B][I][COLOR="Red"]mod_unique_id.c[/COLOR][/I][/B]
  mod_setenvif.c
  mod_proxy.c
  mod_proxy_connect.c
  mod_proxy_ftp.c
  mod_proxy_http.c
  mod_proxy_ajp.c
  mod_proxy_balancer.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_dav.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_suexec.c
  mod_cgi.c
  mod_dav_fs.c
  mod_dav_lock.c
  mod_negotiation.c
  mod_dir.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_rewrite.c
  mod_so.c

Does that means it's already in there and thus I don't actually need to call it? I'm reading up on the httpd 2.2 docs and it looks like I don't need to actually build it but it's not clear and documentation on the web is thin on this particular subject.
 
Yes, it's a list of compiled-in modules and you have mod_unique_id extension on your server :)
 
yeah I just figured it out, took some digging.

So for those who run across this one day, for your info there is two ways to do this:

1) under /usr/local/directadmin/custombuild/configuration/ap2/configure.apache just add the following:
Code:
--enable-unique-id
with the correct formatting of course (that means a \ if you are inserting it mid-stream or a \ on the statement before it if you are putting it in at the end).

2) The way I just did, courtesy of the DA folks having the foresight to compile the DSO library in with apache, this worked for me as well without the need to rebuild apache:

Code:
[root@empire opt]# apxs -g -n unique_id
Creating [DIR]  unique_id
Creating [FILE] unique_id/Makefile
Creating [FILE] unique_id/modules.mk
Creating [FILE] unique_id/mod_unique_id.c
Creating [FILE] unique_id/.deps
This creates the makefile and the code. Then I had to do:
Code:
[root@empire opt]# cd unique_id
[root@empire unique_id]# apxs -c -i mod_unique_id.c
/var/www/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/include -I/usr/include/apache  -I/usr/include/apache   -I/usr/include/apache   -c -o mod_unique_id.lo mod_unique_id.c && touch mod_unique_id.slo
/var/www/build/libtool --silent --mode=link gcc -o mod_unique_id.la  -rpath /usr/lib/apache -module -avoid-version    mod_unique_id.lo
/var/www/build/instdso.sh SH_LIBTOOL='/var/www/build/libtool' mod_unique_id.la /usr/lib/apache
/var/www/build/libtool --mode=install cp mod_unique_id.la /usr/lib/apache/
cp .libs/mod_unique_id.so /usr/lib/apache/mod_unique_id.so
cp .libs/mod_unique_id.lai /usr/lib/apache/mod_unique_id.la
cp .libs/mod_unique_id.a /usr/lib/apache/mod_unique_id.a
chmod 644 /usr/lib/apache/mod_unique_id.a
ranlib /usr/lib/apache/mod_unique_id.a
PATH="$PATH:/sbin" ldconfig -n /usr/lib/apache
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib/apache

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/lib/apache/mod_unique_id.so

And now I just have to load it into my httpd.conf file. I've never actually used apxs before so that made it kinda easy. I suppose (if someone can confirm, would be appreciated) that if I upgrade apache to 2.2.xx in the future, if I keep the DSO route (option 2), I'll have to rebuild it again and again versus in option 1, it'll be up to date for me automagically. Is that accurate?



edit: And thank you very much smtalk, I appreciate the assistance here.
 
Last edited:
Back
Top