You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Robert Gahl <bg...@bawcsa.org> on 2002/07/17 01:47:05 UTC

relocation error with 1.3.26

I have, in the past, always compiled apache statically. I now have a 
requirement where I need to use DSO.

I compile Apache with:

./configure --prefix=/usr/local/apache.test --enable-module=most 
--enable-shared=max

and then compile it using:

gmake

as myself where my gcc version is:

><bgahl>: gcc -v
>Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
>gcc version 2.95.2 19991024 (release)

I install as root, and then, as root, execute (in $APACHE_HOME/bin/):

apachectl configtest

I get the following error:

><root>: ./apachectl configtest
>Syntax error on line 205 of /usr/local/apache.test/conf/httpd.conf:
>Cannot load /usr/local/apache.test/libexec/mod_vhost_alias.so into server: 
>ld.so.1: /usr/local/apache.test/bin/httpd: fatal: relocation error: file 
>/usr/local/apache.test/libexec/mod_vhost_alias.so: symbol 
>ap_os_is_path_absolute: referenced symbol not found

If I remove the offending line:

>LoadModule vhost_alias_module libexec/mod_vhost_alias.so

then the following line will throw the above error.

I am compiling this code on Solaris 7:

><bgahl>: uname -a
>SunOS toolbar 5.7 Generic_106541-18 sun4u sparc SUNW,UltraSPARC-IIi-cEngine

Note that if I try to execute apache with "apachectl start" I get the same 
error. Any ideas?

===
Bob Gahl Bicycle (Ryan Vanguard) Mobile ||     @
     ARPA/Internet: bgahl@bawcsa.org     ||  !_ \
    URL: http://www.bawcsa.org/bgahl/    ||  (*)-~--+--(*)
"Sahn joong moe low ful how jee yah ching wong" - "When the
mountain has no tigers, the monkey will also declare himself
king." Chinese Proverb


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: relocation error with 1.3.26

Posted by Robert Gahl <bg...@bawcsa.org>.
At 09:10 AM 7/17/2002 -0400, Mark Mentovai wrote:
>Robert Gahl wrote:
> > I have, in the past, always compiled apache statically. I now have a
> > requirement where I need to use DSO.
> >
> > I compile Apache with:
> >
> > ./configure --prefix=/usr/local/apache.test --enable-module=most
> > --enable-shared=max
>
>Add --enable-rule=SHARED_CORE to that.
>
> > >Cannot load /usr/local/apache.test/libexec/mod_vhost_alias.so into 
> server:
> > >ld.so.1: /usr/local/apache.test/bin/httpd: fatal: relocation error: file
> > >/usr/local/apache.test/libexec/mod_vhost_alias.so: symbol
> > >ap_os_is_path_absolute: referenced symbol not found
>
>A common reason for that type of error is that the symbols from the Apache 
>core
>are not available to the modules that it loads.  SHARED_CORE overcomes this
>problem.

I did not try the LD_LIBRARY_PATH idea mentioned earlier, but the 
SHARED_CORE did the trick for me and has become part of my standard apache 
configuration line for DSO usage. Thanks for the pointer (and the help from 
everyone). My apache is back up and running (with tomcat).


===
Bob Gahl Bicycle (Ryan Vanguard) Mobile ||     @
     ARPA/Internet: bgahl@bawcsa.org     ||  !_ \
    URL: http://www.bawcsa.org/bgahl/    ||  (*)-~--+--(*)
"Sahn joong moe low ful how jee yah ching wong" - "When the
mountain has no tigers, the monkey will also declare himself
king." Chinese Proverb


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Specifying users IP using auth.

Posted by Mark Mentovai <ma...@mentovai.com>.
Thomas Sjögren wrote:
> I got three user accounts; userA userB and Visitors, they are all 
> required to enter a username and password to enter the site. 
> 
> I want to deny userA and userB to login unless they use a specified 
> IP-address and allow the other, which are using the Visitors account, 
> from all IP-addresses. I'm using the following rules in a 
> .htaccess-file:
> 
> order deny,allow
> deny from all
> allow from xxx.xxx.xxx.42 #userA
> allow from xxx.xxx.xxx.96 #userB
> 
> But as you can see it locks out all other addresses. 
> Is it possible to make this work?

I posted the solution to a similar problem yesterday, using mod_rewrite and a 
symbolic link.  Here it is, adjusted slightly to suit your needs.  (It should 
be adjusted, anyway, I haven't tested it.)

  <Directory /ServerRoot/htdocs/protect>
    # This directory is only accessible to select clients.  FollowSymLinks
    # is required, because the .password subdirectory is a symbolic link.
    Options +FollowSymLinks
    Order allow,deny
    Allow from all
  </Directory>
  <Directory /ServerRoot/htdocs/protect/.password-1>
    # This directory is a symbolic link to its parent.  Access is restricted
    # to a subset of the clients permitted to access the parent, and
    # password authentication is required.  FollowSymLinks is not strictly
    # required, but because this directory should be handled identically to
    # its parent, any settings made above should be duplicated here.
    Options +FollowSymLinks
    Order allow,deny
    Allow from 192.0.2.42
    AuthName "Trade Secrets"
    AuthType Basic
    AuthUserFile /ServerRoot/conf/passwd
    Require user userA
    Satisfy All
  </Directory>
  <Directory /ServerRoot/htdocs/protect/.password-2>
    # As above, but for userB
    Options +FollowSymLinks
    Order allow,deny
    Allow from 192.0.2.96
    AuthName "Trade Secrets"
    AuthType Basic
    AuthUserFile /ServerRoot/conf/passwd
    Require user userB
    Satisfy All
  </Directory>
  <Directory /ServerRoot/htdocs/protect/.password-3>
    # As above, but for Visitors
    Options +FollowSymLinks
    Order allow,deny
    Allow from all
    AuthName "Trade Secrets"
    AuthType Basic
    AuthUserFile /ServerRoot/conf/passwd
    Require user Visitors
    Satisfy All
  </Directory>
  RewriteEngine on
  # Forbid direct access to /protect/.password-[123].
  RewriteRule ^/protect/\.password-(1|2|3)(/.*)?$ - [F,L]
  # Direct to the appropriate authentication profile by IP address
  RewriteCond %{REMOTE_ADDR} ^192\.0\.2\.42$
  RewriteRule ^/protect/(.*)$ /protect/\.password-1/$1 [L]
  RewriteCond %{REMOTE_ADDR} ^192\.0\.2\.96$
  RewriteRule ^/protect/(.*)$ /protect/\.password-2/$1 [L]
  RewriteRule ^/protect/(.*)$ /protect/\.password-3/$1 [L]

Now create a symbolic link from each .password directory to its parent:

# ln -s . /ServerRoot/htdocs/protect/.password-1
# ln -s . /ServerRoot/htdocs/protect/.password-2
# ln -s . /ServerRoot/htdocs/protect/.password-3

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Specifying users IP using auth.

Posted by Thomas Sjögren <th...@northernsecurity.net>.
I got three user accounts; userA userB and Visitors, they are all 
required to enter a username and password to enter the site. 

I want to deny userA and userB to login unless they use a specified 
IP-address and allow the other, which are using the Visitors account, 
from all IP-addresses. I'm using the following rules in a 
.htaccess-file:

order deny,allow
deny from all
allow from xxx.xxx.xxx.42 #userA
allow from xxx.xxx.xxx.96 #userB

But as you can see it locks out all other addresses. 
Is it possible to make this work?

/Thomas 
-- 
thomas@northernsecurity.net     |     www.northernsecurity.net
PGP: 4315 81B3 9E7F DC00 63DC F1D8 1326 651B AADE 91FC

"You got zero privacy anyway." 
-Scott McNealy, Sun Microsystems

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: relocation error with 1.3.26

Posted by Mark Mentovai <ma...@mentovai.com>.
Robert Gahl wrote:
> I have, in the past, always compiled apache statically. I now have a 
> requirement where I need to use DSO.
> 
> I compile Apache with:
> 
> ./configure --prefix=/usr/local/apache.test --enable-module=most 
> --enable-shared=max

Add --enable-rule=SHARED_CORE to that.

> >Cannot load /usr/local/apache.test/libexec/mod_vhost_alias.so into server: 
> >ld.so.1: /usr/local/apache.test/bin/httpd: fatal: relocation error: file 
> >/usr/local/apache.test/libexec/mod_vhost_alias.so: symbol 
> >ap_os_is_path_absolute: referenced symbol not found

A common reason for that type of error is that the symbols from the Apache core 
are not available to the modules that it loads.  SHARED_CORE overcomes this 
problem.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org