简体   繁体   中英

How To See mod_status / server-status For All Sites When Apache Server Hosts Multiple Sites

I have a general httpd.conf file that looks like this:

<VirtualHost *:80>
    ServerAdmin: me@admin.com
    DocumentRoot /var/www/siteone
    ServerName: siteone.com
    ServerAlias siteone.com
    <Directory "var/www/siteone">
        Options Indexes MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin: me@admin.com
    DocumentRoot /var/www/sitetwo
    ServerName: sitetwo.com
    ServerAlias sitetwo.com
    <Directory "var/www/sitetwo">
        Options Indexes MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
.... More <VirtualHost>s

Is there anyway I can define one <Location /server-status> and have HTTP requests for all my hosted websites show up on a single mod_status page?

What version of Apache httpd you are using? Though I've not tried but can you give a try with below configuration by defining the multiple 'Require host' inside the '/server-status' location of your httpd.conf file.

<Location "/server-status">
    SetHandler server-status
    Require host example.com
</Location>

Please note the above configuration is for Apache 2.4.x.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM