You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jonathan Hays <no...@gfoyle.org> on 2004/03/25 00:13:36 UTC

[users@httpd] 1.3.28 - status page won't display

I am an admitted Apache newbie who is trying to get the status page to
display. I have installed Apache 1.3.28 on Red Hat Fedora Core 1.

I compiled with these switches:
===
configure --prefix=/usr/local/etc/httpd --enable-rule=SHARED_CORE
--ssyconfdir=/www/conf --enable-module=rewrite --enable-module=so
--enable-module=status --activate-module=src/modules/php4/libphp4.a

===
I added the following lines to httpd.conf to enable the server status
reports:

httpd.conf, beginning with line 205:
---
LoadModule status_module /usr/lib/httpd/modules/mod_status.so
AddModule mod_status.c
#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information
(ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On
[output omitted]

#
# Allow server status reports, with the URL of
http://servername/server-status
# Change the ".your-domain.com" to match your domain to enable.
#
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from snort
</Location>
===
But I got this error when trying to start Apache:

[root@snort bin]# ./apachectl start
Syntax error on line 205 of /www/conf/httpd.conf:
Cannot load /usr/lib/httpd/modules/mod_status.so into server:
/usr/lib/httpd/modules/mod_status.so: undefined symbol:
ap_hook_post_config
./apachectl start: httpd could not be started
[root@snort bin]#

===
I commented out httpd.conf lines 205 and 206:

#LoadModule status_module /usr/lib/httpd/modules/mod_status.so
#AddModule mod_status.c

===

Now it starts but I am still not getting status.

[root@snort bin]# ./apachectl start
./apachectl start: httpd started
[root@snort bin]# httpd -l
Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c
[root@snort bin]# ./apachectl status
 
                                   Forbidden
 
   You don't have permission to access /server-status on this server.
     _________________________________________________________________
 
 
    Apache/1.3.28 Server at snort Port 80
[root@snort bin]#

===
I get the feeling that I don't fully understand the interaction between
DocumentRoot and that "<Location /server-status>" section in httpd.conf.

httpd.conf:
---
DocumentRoot "/www/servers"
[output omitted]
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from snort
</Location>

===
I made sure the 'server-status' directory exists and perms are wide
open:

[root@snort servers]# pwd
/www/servers
[root@snort servers]# ls -Rl
.:
total 12
-rwxr-xr-x    1 root     root           58 Mar 24 17:20 index.html
drwxrwxrwx    2 root     root         4096 Mar 24 17:40 server-status
drwxrwxrwx    3 root     root         4096 Mar 24 17:39 snort
 
./server-status:
total 0
 
./snort:
total 4
drwxrwxrwx    2 root     root         4096 Mar 24 17:39 server-status
 
./snort/server-status:
total 0
[root@snort servers]#

===
Can anyone give me some hints where to go next?

Thanks,

Jonathan



---------------------------------------------------------------------
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


RE: [users@httpd] 1.3.28 - status page won't display

Posted by Jonathan Hays <no...@gfoyle.org>.
you wrote:
>-----Original Message-----
>From: Milan Andric [mailto:mandric@eecs.berkeley.edu] 
>Sent: Wednesday, March 24, 2004 7:38 PM
>To: users@httpd.apache.org
>Subject: Re: [users@httpd] 1.3.28 - status page won't display
>
>> I see no LD_LIBRARY_PATH variable. Maybe that is the problem? If so,
>> what do you suggest assigning to the variable, given the ldd output
>> above?
>
>Well, i'm not too sure, but you might as well include 'ldd 
>/path/to/httpd'
>output as well just for good measure.  My guess is you need to 
>recompile if
>apache won't start with mod_status.so because of unresolved 
>symbol.  The
>LD_LIBRARY_PATH variable might be useful if a library can't be 
>found during
>runtime.  As a last resort, try using a fedora (redhat) 
>package if you can't
>get a compiled version working ... :\ 
>
>-- 
>Milan
= = =

I have recompiled a few times - always with the same result. Is there
something specific you had in mind that I should change during the
recompile, with the idea of achieving different results? Below is my
configure command line for reference:
===
configure --prefix=/usr/local/etc/httpd --enable-rule=SHARED_CORE
--ssyconfdir=/www/conf --enable-module=rewrite --enable-module=so
--enable-module=status --activate-module=src/modules/php4/libphp4.a

===
Good idea on the using the FC1 package. I hadn't thought of that.

Thanks,

Jonathan



---------------------------------------------------------------------
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


Re: [users@httpd] 1.3.28 - status page won't display

Posted by Milan Andric <ma...@eecs.berkeley.edu>.
On Wed, Mar 24, 2004 at 07:10:06PM -0500, Jonathan Hays wrote:
> you wrote:
> >-----Original Message-----
> >From: Milan Andric [mailto:mandric@eecs.berkeley.edu] 
> >Sent: Wednesday, March 24, 2004 6:37 PM
> >To: users@httpd.apache.org
> >Subject: Re: [users@httpd] 1.3.28 - status page won't display
> >
> [snip]
> >> ===
> >> But I got this error when trying to start Apache:
> >> 
> >> [root@snort bin]# ./apachectl start
> >> Syntax error on line 205 of /www/conf/httpd.conf:
> >> Cannot load /usr/lib/httpd/modules/mod_status.so into server:
> >> /usr/lib/httpd/modules/mod_status.so: undefined symbol:
> >> ap_hook_post_config
> >> ./apachectl start: httpd could not be started
> >> [root@snort bin]#
> >
> >this means a library isn't linked correctly or something might 
> >not be compiled
> >correctly. what does ldd /usr/lib/httpd/modules/mod_status.so return?
> = = =
> 
> See below:
> [root@snort root]# ldd /usr/lib/httpd/modules/mod_status.so
>         libc.so.6 => /lib/tls/libc.so.6 (0x003d8000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x003c0000)
> [root@snort root]#
> 
> 
> >
> >you might be able to add edit apachectl and add a path to 
> >$LD_LIBRARY_PATH
> = = =
> 
> Hmmm. I looked in apachectl it is not obvious what I am supposed to add.
> Further, when I execute 'set' to get a list of environmental variables,
> I see no LD_LIBRARY_PATH variable. Maybe that is the problem? If so,
> what do you suggest assigning to the variable, given the ldd output
> above?

Well, i'm not too sure, but you might as well include 'ldd /path/to/httpd'
output as well just for good measure.  My guess is you need to recompile if
apache won't start with mod_status.so because of unresolved symbol.  The
LD_LIBRARY_PATH variable might be useful if a library can't be found during
runtime.  As a last resort, try using a fedora (redhat) package if you can't
get a compiled version working ... :\ 

-- 
Milan

---------------------------------------------------------------------
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


RE: [users@httpd] 1.3.28 - status page won't display

Posted by Jonathan Hays <no...@gfoyle.org>.
you wrote:
>-----Original Message-----
>From: Milan Andric [mailto:mandric@eecs.berkeley.edu] 
>Sent: Wednesday, March 24, 2004 6:37 PM
>To: users@httpd.apache.org
>Subject: Re: [users@httpd] 1.3.28 - status page won't display
>
[snip]
>> ===
>> But I got this error when trying to start Apache:
>> 
>> [root@snort bin]# ./apachectl start
>> Syntax error on line 205 of /www/conf/httpd.conf:
>> Cannot load /usr/lib/httpd/modules/mod_status.so into server:
>> /usr/lib/httpd/modules/mod_status.so: undefined symbol:
>> ap_hook_post_config
>> ./apachectl start: httpd could not be started
>> [root@snort bin]#
>
>this means a library isn't linked correctly or something might 
>not be compiled
>correctly. what does ldd /usr/lib/httpd/modules/mod_status.so return?
= = =

See below:
[root@snort root]# ldd /usr/lib/httpd/modules/mod_status.so
        libc.so.6 => /lib/tls/libc.so.6 (0x003d8000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x003c0000)
[root@snort root]#


>
>you might be able to add edit apachectl and add a path to 
>$LD_LIBRARY_PATH
= = =

Hmmm. I looked in apachectl it is not obvious what I am supposed to add.
Further, when I execute 'set' to get a list of environmental variables,
I see no LD_LIBRARY_PATH variable. Maybe that is the problem? If so,
what do you suggest assigning to the variable, given the ldd output
above?

Thanks in advance,

-Jonathan



---------------------------------------------------------------------
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


Re: [users@httpd] 1.3.28 - status page won't display

Posted by Milan Andric <ma...@eecs.berkeley.edu>.
On Wed, Mar 24, 2004 at 06:13:36PM -0500, Jonathan Hays wrote:
> I am an admitted Apache newbie who is trying to get the status page to
> display. I have installed Apache 1.3.28 on Red Hat Fedora Core 1.
> 
> I compiled with these switches:
> ===
> configure --prefix=/usr/local/etc/httpd --enable-rule=SHARED_CORE
> --ssyconfdir=/www/conf --enable-module=rewrite --enable-module=so
> --enable-module=status --activate-module=src/modules/php4/libphp4.a
> 
> ===
> I added the following lines to httpd.conf to enable the server status
> reports:
> 
> httpd.conf, beginning with line 205:
> ---
> LoadModule status_module /usr/lib/httpd/modules/mod_status.so
> AddModule mod_status.c
> #
> # ExtendedStatus controls whether Apache will generate "full" status
> # information (ExtendedStatus On) or just basic information
> (ExtendedStatus
> # Off) when the "server-status" handler is called. The default is Off.
> #
> ExtendedStatus On
> [output omitted]
> 
> #
> # Allow server status reports, with the URL of
> http://servername/server-status
> # Change the ".your-domain.com" to match your domain to enable.
> #
> <Location /server-status>
>     SetHandler server-status
>     Order deny,allow
>     Deny from all
>     Allow from snort
> </Location>
> ===
> But I got this error when trying to start Apache:
> 
> [root@snort bin]# ./apachectl start
> Syntax error on line 205 of /www/conf/httpd.conf:
> Cannot load /usr/lib/httpd/modules/mod_status.so into server:
> /usr/lib/httpd/modules/mod_status.so: undefined symbol:
> ap_hook_post_config
> ./apachectl start: httpd could not be started
> [root@snort bin]#

this means a library isn't linked correctly or something might not be compiled
correctly. what does ldd /usr/lib/httpd/modules/mod_status.so return?

you might be able to add edit apachectl and add a path to $LD_LIBRARY_PATH

> 
> ===
> I commented out httpd.conf lines 205 and 206:
> 
> #LoadModule status_module /usr/lib/httpd/modules/mod_status.so
> #AddModule mod_status.c
> 
> ===
> 
> Now it starts but I am still not getting status.
> 

because /server-status won't work without the module.

> [root@snort bin]# ./apachectl start
> ./apachectl start: httpd started
> [root@snort bin]# httpd -l
> Compiled in modules:
>   core.c
>   prefork.c
>   http_core.c
>   mod_so.c
> [root@snort bin]# ./apachectl status
>  
>                                    Forbidden
>  
>    You don't have permission to access /server-status on this server.
>      _________________________________________________________________
>  
>  
>     Apache/1.3.28 Server at snort Port 80
> [root@snort bin]#
> 
> ===
> I get the feeling that I don't fully understand the interaction between
> DocumentRoot and that "<Location /server-status>" section in httpd.conf.
> 
> httpd.conf:
> ---
> DocumentRoot "/www/servers"
> [output omitted]
> <Location /server-status>
>     SetHandler server-status
>     Order deny,allow
>     Deny from all
>     Allow from snort
> </Location>
> 
> ===
> I made sure the 'server-status' directory exists and perms are wide

i don't think you need to create a 'server-status' directory at all

> open:
> 
> [root@snort servers]# pwd
> /www/servers
> [root@snort servers]# ls -Rl
> .:
> total 12
> -rwxr-xr-x    1 root     root           58 Mar 24 17:20 index.html
> drwxrwxrwx    2 root     root         4096 Mar 24 17:40 server-status
> drwxrwxrwx    3 root     root         4096 Mar 24 17:39 snort
>  
> ./server-status:
> total 0
>  
> ./snort:
> total 4
> drwxrwxrwx    2 root     root         4096 Mar 24 17:39 server-status
>  
> ./snort/server-status:
> total 0
> [root@snort servers]#
> 
> ===
> Can anyone give me some hints where to go next?
> 
> Thanks,
> 
> Jonathan
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 

-- 
Milan

---------------------------------------------------------------------
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


RE: [users@httpd] 1.3.28 - status page won't display

Posted by Jonathan Hays <no...@gfoyle.org>.
fixed. See below.
>-----Original Message-----
>From: Jonathan Hays [mailto:nomad@gfoyle.org] 
>Sent: Wednesday, March 24, 2004 6:14 PM
>To: Users@Httpd. Apache. Org
>Subject: [users@httpd] 1.3.28 - status page won't display
>
= = =
My excuse is that I just joined the list this afternoon. ;-)

I went back and looked at the post from George Hester (5:49 pm) which
referred to Location section in httpd.conf. Here's my original 

The original order:

><Location /server-status>
>    SetHandler server-status
>    Order deny,allow
>    Deny from all
>    Allow from snort
></Location>

Currently:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Allow from snort 
    Deny from all
</Location>

And the results:

[root@snort bin]# ./apachectl status
 
                            Index of /server-status
 
        [1]Name                    [2]Last modified       [3]Size
[4]Descripti
on
 
________________________________________________________________________
__
 
 [DIR]  [5]Parent Directory        24-Mar-2004 17:39      -
     _________________________________________________________________
 
 
    Apache/1.3.28 Server at snort Port 80
 
References
 
   1. http://snort/server-status/?N=D
   2. http://snort/server-status/?M=A
   3. http://snort/server-status/?S=A
   4. http://snort/server-status/?D=A
   5. http://snort/
[root@snort bin]# 


Evidently it is not necessary to have the "LoadModule" statement in
httpd.conf. I still have "LoadModule status_module
/usr/lib/httpd/modules/mod_status.so" and "AddModule mod_status.c"
commented out and the server-status module seems to be working. 

Is that the normal output?

Jonathan



---------------------------------------------------------------------
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