DirectAdmin系统负载过高-排查各个用户的系统资源使用情况

1.06K 阅读技术资料DirectAdmin
0

DirectAdmin主机如果系统负载过高,可能是个别用户存在滥用的行为,这时我们可以使用server-status页面来查看了,非常地详细。

编辑文件:/etc/httpd/conf/extra/httpd-info.conf,然后按照下面的要求修改如下:

If you're running apache 2.x with custombuild, then it's already in the file:
/etc/httpd/conf/extra/httpd-info.conf
  Change the "Allow from" lines to include your IP (eg: 1.2.3.4), OR remove the line completely to allow from all.
<Location /server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from 1.2.3.4
</Location>
 OR
<Location /secret-server-status>
        SetHandler server-status
</Location>
 Change the /server-status to something hard-to guess if you use the 2nd method, since we don't want just anyone viewing this page.
 Also change uncomment the #ExtendedStatus by removing the # character:
ExtendedStatus On
      For apache 1.3, edit your /etc/httpd/conf/httpd.conf and add
ExtendedStatus On
<Location /httpd-status>
SetHandler server-status
</Location>
 just after the code that says "ServerSignature On".   Save, exit, then restart apache.  You can access the stats page by going to http://1.2.3.4/httpd-status where 1.2.3.4 is your server's IP.

上文中采用的是IP验证的方式,我们也可以使用域名访问的方式:

#
# Get information about the requests being processed by the server
# and the configuration of the server.
#
# Required modules: mod_authz_core, mod_authz_host,
#                   mod_info (for the server-info handler),
#                   mod_status (for the server-status handler)
 #
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
 <Location /server-status>
    SetHandler server-status
    Require host da.wzfou.com
    Require ip 127.0.0.1
</Location>
 #
# 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
 #
# Allow remote server configuration reports, with the URL of
#  http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
<Location /server-info>
    SetHandler server-info
    Require host da.wzfou.com
    Require ip 127.0.0.1
</Location>

最后重启Http服务生效。来源官方:https://help.directadmin.com/item.php?id=91


分享到:
提问于

Login

Welcome! Login in to your account

Remember me Lost your password?

Don't have account. Register

Lost Password

Register