httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] Installing DSO
Date Thu, 09 Jan 2003 11:54:14 GMT


>-----Original Message-----
>From: Gareth Kirwan [mailto:gbjk@thermeoneurope.com]
>Sent: Donnerstag, 9. Januar 2003 12:45
>To: users@httpd.apache.org
>Subject: RE: [users@httpd] Installing DSO
>
>
>Heya,
>
>	I'm getting to grips with the DSO / sharable object 
>system a lot better now - thank you.
>
>	The configure I'm using looks like:
>
>./configure \
>	--prefix=/etc/httpd/ \
>	--enable-module=so \
>	--activate-module=src/modules/perl/libperl.a 
>--enable-module=perl \
>	--enable-shared=ssl --enable-module=ssl\
>	--enable-shared=log_agent --enable-module=log_agent \
>	--enable-shared=log_referer --enable-module=log_referer \
>	--enable-shared=info --enable-module=info \
>	--enable-shared=auth_anon --enable-module=auth_anon \
>	--enable-shared=headers --enable-module=headers
>
>And my httpd.conf no longer has an AddModule section or a 
>ClearModuleList command.
>
>It does however contain a list of LoadModules:
>
>LoadModule env_module           modules/mod_env.so
>LoadModule config_log_module    modules/mod_log_config.so
>LoadModule agent_log_module     modules/mod_log_agent.so
>LoadModule referer_log_module   modules/mod_log_referer.so
>LoadModule mime_module          modules/mod_mime.so
>LoadModule negotiation_module   modules/mod_negotiation.so
>LoadModule status_module        modules/mod_status.so
>LoadModule info_module          modules/mod_info.so
>LoadModule includes_module      modules/mod_include.so
>LoadModule autoindex_module     modules/mod_autoindex.so
>LoadModule dir_module           modules/mod_dir.so
>LoadModule cgi_module           modules/mod_cgi.so
>LoadModule asis_module          modules/mod_asis.so
>LoadModule action_module        modules/mod_actions.so
>LoadModule userdir_module       modules/mod_userdir.so
>LoadModule alias_module         modules/mod_alias.so
>LoadModule access_module        modules/mod_access.so
>LoadModule auth_module          modules/mod_auth.so
>LoadModule anon_auth_module     modules/mod_auth_anon.so
>LoadModule headers_module       modules/mod_headers.so
>LoadModule setenvif_module      modules/mod_setenvif.so
>
>Do I still need the LoadModule directives with the Configure 
>I've used ( I'm RTFM - believe me I am :D ) ?
>
>httpd -l shows:
>Compiled-in modules:
>  http_core.c
>  mod_env.c
>  mod_log_config.c
>  mod_log_agent.c
>  mod_mime.c
>  mod_negotiation.c
>  mod_status.c
>  mod_include.c
>  mod_autoindex.c
>  mod_dir.c
>  mod_cgi.c
>  mod_asis.c
>  mod_imap.c
>  mod_actions.c
>  mod_userdir.c
>  mod_alias.c
>  mod_access.c
>  mod_auth.c
>  mod_so.c
>  mod_setenvif.c
>  mod_perl.c
>suexec: disabled; invalid wrapper /etc/httpd/bin/suexec
>
>However the libexec directory contains:
>mod_auth_anon.so
>mod_headers.so
>mod_info.so
>mod_log_referer.so
>
>So Am I right in saying that I now only need to do a 
>LoadModule on these in the httpd.conf ?

Exactly. You don't need to LoadModule those modules which are already compiled in. LoadModule
is only used for externally compiled modules (i.e. the *.so above).

>
>At some later stage I'll be adding more modules - such as 
>mod_gzip ... I should be able to do this without re-compiling - right?

Well... you have to compile mod_gzip... Here are my notes from the last time I did this:

Adding a DSO module to a DSO apache
-----------------------------------

Apache 1.3.24 (DSO version) has been compiled with base modules installed
and with some Extension modules compiled but left in /home/apache/libexec.

Now we compile an additional module and load it: mod_proxy.

$ su 
# cd /home/apache/apache_1.3.24/src
# vi Configuration

  - compile with extended API since we are using mod_ssl
  << # CFLAGS_SHLIB=-DEAPI
  >> CFLAGS_SHLIB=-DEAPI

  - make the module shareable
  << AddModule modules/proxy/libproxy.a
  >> SharedModule modules/proxy/libproxy.so

- rebuild the makefiles and compile
# ./Configure
# make

- copy the .so manually
# cd /home/apache
# cp apache_1.3.24/src/modules/proxy/libproxy.so libexec/libproxy.so

Now the module is accessible to apache.

>
>Cheers Boyle and everyone
>
>> -----Original Message-----
>> From: Boyle Owen [mailto:Owen.Boyle@swx.com]
>> >-----Original Message-----
>> >From: Gareth Kirwan [mailto:gbjk@thermeoneurope.com]
>> >
>> >Where should apache be putting the .so modules ( I'm assuming 
>> >it creates them since you said "all the modules you load 
>> >should have been recompiled with apache" )
>> >I'm planning on copying them to a modules directory in the 
>> >/etc/httpd/ directory.
>> 
>> Normally, they end up in $PREFIX/libexec. So if you compile 
>> with --PREFIX=/home/apache, then you'll find the freshly 
>> compiled dynamic modules in /home/apache/libexec.
>> 
>> >
>> >Gareth
>> >
>> >> >-----Original Message-----
>> >> >From: Gareth Kirwan [mailto:gbjk@thermeoneurope.com]
>> >> 
>> >> >I've gone through the steps I thought were right - and hit the 
>> >> >same problem.
>> >> >The server seems to be working ok - but when I start it the 
>> >> >error log gets:
>> >> >
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_perl.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_setenvif.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_auth.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_access.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_alias.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_userdir.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_actions.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_imap.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_asis.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_cgi.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_dir.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_autoindex.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_include.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_status.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_negotiation.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_mime.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_log_config.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [error] Cannot remove module 
>> >> >mod_env.c: not found in module list
>> >> >[Thu Jan  9 09:58:09 2003] [notice] Apache/1.3.27 (Unix) 
>> >> >mod_perl/1.27 configured -- resuming normal
>> >> > operations
>> >> >[Thu Jan  9 09:58:09 2003] [notice] Accept mutex: sysvsem 
>> >> >(Default: sysvsem)
>> >> >
>> >> >Then when I try making a request I get a segmentation fault:
>> >> >[Thu Jan  9 09:58:11 2003] [notice] child pid 15129 exit 
>> >> >signal Segmentation fault (11)
>> >> >
>> >> >This doesn't happen if I don't Load any modules at all in the 
>> >> >httpd.conf.
>> >> >
>> >> >I use the a LoadMdoule list followed by a ClearModuleList 
>> >> >followed by an AddModule list ...
>> >> 
>> >> This is not right... AddModule activates modules which are 
>> >> compiled in - that's not what you're doing. You want to load 
>> >> external modules. So you should only do, e.g.:
>> >> 
>> >> LoadModule headers_module /home/apache/libexec/mod_headers.so
>> >> 
>> >> Incidentally, all the modules you load should have been 
>> >> recompiled with apache (check timestamps). If you load a 
>> >> module compiled against an earlier version of apache, it will 
>> >> seg-fault.
>> >> 
>> >> Rgds,
>> >> 
>> >> Owen Boyle
>> >> 
>> >> >I'm just about to try and see if it loads any modules without 
>> >> >throwing the seg error - if it does I'll try and eliminate the 
>> >> >single or multiple modules causing it issues...
>> >> >However, in the meantime, do you have any ideas about the 
>> >> >errors above ?
>> >> >
>> >> >Thanks
>> >> >
>> >> >Gareth
>> >> >
>> >> >> -----Original Message-----
>> >> >> From: Boyle Owen [mailto:Owen.Boyle@swx.com]
>> >> >> Sent: 08 January 2003 09:46
>> >> >> To: gbjk@thermeoneurope.com
>> >> >> Subject: RE: [users@httpd] Installing DSO
>> >> >> 
>> >> >> 
>> >> >> >-----Original Message-----
>> >> >> >From: Gareth Kirwan [mailto:gbjk@thermeoneurope.com]
>> >> >> >Sent: Mittwoch, 8. Januar 2003 09:49
>> >> >> >To: Boyle Owen; users@httpd.apache.org
>> >> >> >Subject: RE: [users@httpd] Installing DSO
>> >> >> >
>> >> >> >
>> >> >> >Cheers Owen.
>> >> >> >
>> >> >> >When you say "compile in" mod_so ... do you mean compile make

>> >> >> >and install it ?
>> >> >> >
>> >> >> >./configure \
>> >> >> >	--prefix=/etc/httpd/ \
>> >> >> >	--activate-module=src/modules/perl/libperl.a \
>> >> >> >	--enable-module=ssl \
>> >> >> >	--enable-module=perl \
>> >> >> >	--enable-module=so \
>> >> >> >
>> >> >> >That's the configure I used for apache...
>> >> >> >I'd configured, make, and make installed'd mod_perl.... but

>> >> >> >not mod_so - are you suggesting that I should ?
>> >> >> 
>> >> >> Absolutely... mod_so is the module which allows you to load 
>> >> >> other modules dynamically (so = "shareable object"). It is 
>> >> >> this module which parses the "LoadModule" directive so 
>> >> >> LoadModule won't work without it!
>> >> >> 
>> >> >> BTW, you don't need to compile in mod_ssl - it can be loaded 
>> >> >> at runtime too. My last compile went like this:
>> >> >> 
>> >> >> ./configure --prefix=/home/apache \
>> >> >> --enable-module=so \
>> >> >> --activate-module=src/modules/perl/libperl.a 
>> >--enable-module=perl \
>> >> >> --enable-shared=rewrite --enable-module=rewrite \
>> >> >> --enable-shared=usertrack --enable-module=usertrack \
>> >> >> --enable-shared=expires --enable-module=expires \
>> >> >> --enable-shared=headers --enable-module=headers \
>> >> >> --enable-shared=proxy --enable-module=proxy \
>> >> >> --enable-shared=ssl --enable-module=ssl
>> >> >> 
>> >> >> So only mod_perl and mod_so get compiled in, all the others 
>> >> >> are compiled as DSOs and end up in libexec.
>> >> >> 
>> >> >> >
>> >> >> >Mailing lists often have different formalities - I'm a member

>> >> >> >of about 12 regular ones and they all have different 
>> stigmas ...
>> >> >> >I'll try to remember this one likes plain text most. 
>( most of 
>> >> >> >them have the biggest problem with using "Original Message"

>> >> >> >tags and "top posting" )
>> >> >> >
>> >> >> >Cheers
>> >> >> >
>> >> >> >Gareth
>> >> >> >
>> >> >> >> -----Original Message-----
>> >> >> >> From: Boyle Owen [mailto:Owen.Boyle@swx.com]
>> >> >> >> Sent: 08 January 2003 08:42
>> >> >> >> To: users@httpd.apache.org; gbjk@thermeoneurope.com
>> >> >> >> Subject: RE: [users@httpd] Installing DSO
>> >> >> >> 
>> >> >> >> 
>> >> >> >> You might like to look at 
>> http://www.delouw.ch/linux/. This guy
>> >> >> >> maintains a fairly up-to-date cookbook for most apache

>> >> >> installations.
>> >> >> >> 
>> >> >> >> As a brief summary:
>> >> >> >> 
>> >> >> >> - you need to complie in mod_so to allow DSO support
>> >> >> >> - you should compile in mod_perl - apparently it 
>> >> doesn't work as a
>> >> >> >> DSO-loaded module. 
>> >> >> >> 
>> >> >> >> Rgds,
>> >> >> >> 
>> >> >> >> Owen Boyle
>> >> >> >> 
>> >> >> >> PS - plain text is best for email lists...
>> >> >> >> 
>> >> >> >> 
>> >> >> >> -----Original Message-----
>> >> >> >> From: Gareth Kirwan [mailto:gbjk@thermeoneurope.com]
>> >> >> >> Sent: Dienstag, 7. Januar 2003 18:20
>> >> >> >> To: users@httpd.apache.org
>> >> >> >> Subject: [users@httpd] Installing DSO
>> >> >> >> 
>> >> >> >> 
>> >> >> >> 'ello everyone.
>> >> >> >> 
>> >> >> >> I'm new to this list - and this is my first post - 
>> so go easy 
>> >> >> >> on me ;-)
>> >> >> >> 
>> >> >> >> I've been trying to install a basic mod_perl, mod_ssl
& 
>> >> >> apache 1.3.27
>> >> >> >> DSO setup ... without success.
>> >> >> >> I want to be able to add new modules to the installation

>> >> >easily - I
>> >> >> >> thought DSO was the way to go - am I wrong ?
>> >> >> >> 
>> >> >> >> When I've done the installation my httpd.conf uses a 
>> >> >> LoadModule list,
>> >> >> >> followed by a ClearModuleList followed by an 
>> AddModule list...
>> >> >> >> It falls over claiming that LoadModule is provided by
a 
>> >> >> >source unknown
>> >> >> >> to it...
>> >> >> >> 
>> >> >> >> Is there a guide to this style of installation that I
can 
>> >> >> >> look at that I
>> >> >> >> ( as of yet ) haven't found? 
>> >> >> >> 
>> >> >> >> Sorry if this is a simple question and I've just missed

>> >> >> some docs ...
>> >> >> >> 
>> >> >> >> Gareth Kirwan
>> >> >> >> Programming & Development,
>> >> >> >> Thermeon Europe Ltd,
>> >> >> >> gbjk@thermeoneurope.com 
>> >> >> >> Tel: +44 (0) 1293 864 303
>> >> >> >> Thermeon Europe e-Card: gbjk
>> >> >> >> 
>> >> >> >> This message is for the named person's use only. It 
>> may contain
>> >> >> >> confidential, proprietary or legally privileged 
>> information. No
>> >> >> >> confidentiality or privilege is waived or lost by any

>> >> >> >mistransmission.
>> >> >> >> If you receive this message in error, please notify the

>> >> >> >> sender urgently
>> >> >> >> and then immediately delete the message and any 
>copies of it 
>> >> >> >from your
>> >> >> >> system. Please also immediately destroy any hardcopies
of 
>> >> >> >the message.
>> >> >> >> You must not, directly or indirectly, use, disclose, 
>> >> >> >> distribute, print,
>> >> >> >> or copy any part of this message if you are not the 
>intended 
>> >> >> >> recipient.
>> >> >> >> The sender's company reserves the right to monitor 
>all e-mail
>> >> >> >> communications through their networks. Any views 
>> >> expressed in this
>> >> >> >> message are those of the individual sender, except where

>> >> >> the message
>> >> >> >> states otherwise and the sender is authorised to state

>> >> >> them to be the
>> >> >> >> views of the sender's company. 
>> >> >> >> 
>> >> >> >
>> >> >> 
>> >> >
>> >> 
>> >> 
>> ---------------------------------------------------------------------
>> >> The official User-To-User support forum of the Apache HTTP 
>> >> Server Project.
>> >> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> >>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> >> For additional commands, e-mail: users-help@httpd.apache.org
>> >> 
>> >
>> 
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP 
>> Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>> 
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message