?
Solved

Apache server-status

Posted on 2011-05-10
10
Medium Priority
?
834 Views
Last Modified: 2012-05-11
When I enter

rcapache2 server-status

on the command line I get:
==
Object not found!

The requested URL was not found on this server. If you entered the URL manually
please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

localhost
Tue May 10 09:12:00 2011
Apache/2.2.3 (Linux/SUSE)
==

What do I have to configure to have the status displayed?

Thanks
0
Comment
Question by:netslt
10 Comments
 
LVL 2

Expert Comment

by:nrip_cheema
ID: 35727798
Check this link out

http://forums.opensuse.org/english/get-technical-help-here/network-internet/449780-rcapache2-server-status-does-not-work.html

alternatively you can also check the service as

# /etc/init.d/apache2 status
0
 
LVL 11

Expert Comment

by:kaskhedikar_tushar
ID: 35729138
Hi,

First of all check that the server is running or not?

Regards,
Tushar Kaskhedikar
0
 

Author Comment

by:netslt
ID: 35729343
@kaskhedikar_tushar: sure the server runs ;-)
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
LVL 5

Expert Comment

by:SimonDard
ID: 35737350
Make sure that mod_status is loaded and on somewhere in httpd.conf or an included configuration file:

LoadModule status_module /path/to/mod_status.so

Optionally enable extended status:
<IfModule mod_status.c>
ExtendedStatus On
</IfModule>

Decide where you want to access the status page. You can add it to the server config or a specific vhost and the URL can be configured as well. For simplicity, lets assume you have one vhost and want to access www.mydomain.com/server-status. Add this to that vhost:

<Location /server-status>
  SetHandler server-status
</Location>

It's SetHandler that does the magic. It makes sure that whenever the Location is requested, the output of mod_status is shown. You can add Allow/Deny rules to make sure only you can see what's going on, but that's a different subject.
0
 

Author Comment

by:netslt
ID: 35737749
Hi

I already had that in my virtual server.conf:

<Location /server-status>
SetHandler server-status

Order Deny,Allow
Deny from all
Allow from all
</Location>

In my /etc/apache2/mod_status.conf I have

==#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
#
# see http://httpd.apache.org/docs-2.2/mod/mod_status.html
#
<IfModule mod_status.c>
    <Location /server-status>
        SetHandler server-status
        Order deny,allow
        #Deny from all
Allow from all
    </Location>
</IfModule>
===

But when I call http://www.myvhost.com/server-status/

I get a 404 error, so something must be missing.

Thanks for helping...
0
 
LVL 5

Accepted Solution

by:
SimonDard earned 1500 total points
ID: 35738000
Make sure you call http://www.myvhost.com/server-status (no slash at the end)

Use apache2ctl on the commandline to find out if the mod was actually loaded:
apache2ctl -t -D DUMP_MODULES  
although if it wasn't Apache should not even start because of the SetHandler in server.conf

Also, nrip_cheema's post shows that with rcapache2 you should call 'status' instead of 'server-status' which is a little confusing.
0
 

Author Comment

by:netslt
ID: 35738039
Loaded Modules:
 core_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_host_module (shared)
 authz_groupfile_module (shared)
 authz_default_module (shared)
 authz_user_module (shared)
 authn_dbm_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 dir_module (shared)
 env_module (shared)
 expires_module (shared)
 include_module (shared)
 log_config_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 suexec_module (shared)
 userdir_module (shared)
 php5_module (shared)
 rewrite_module (shared)


Seems it is not loaded.

Where do I have to change something so it will be loaded?

Regarding using status or server-status with rcapache2: on SuSE "status" show wethere the server is running or not:

 rcapache2 status
Checking for httpd2:                                                  running

so thats why server-status has to be used....
0
 

Author Comment

by:netslt
ID: 35738792
I finally found out what was missing, I had to call

a2enmod mod_status

after that everything was working.

thanks for your help
0
 

Author Closing Comment

by:netslt
ID: 35738809
the apache2ctl -t -D DUMP_MODULES command helped me to find the module was not loaded, so i just had to search on how to load it on a suse system
0
 

Author Comment

by:netslt
ID: 35738828
By the way, its possible to call /server-status/ with a slash at the end, works...
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question