zoukankan      html  css  js  c++  java
  • Saltstack module apache 详解

    apache.useradd

    Add HTTP user using the ``htpasswd`` command. If the ``htpasswd`` file does not
    exist, it will be created. Valid options that can be passed are:
    
        n  Don't update file; display results on stdout.
        m  Force MD5 hashing of the password (default).
        d  Force CRYPT(3) hashing of the password.
        p  Do not hash the password (plaintext).
        s  Force SHA1 hashing of the password.
    
    CLI Examples:
    
        salt '*' apache.useradd /etc/httpd/htpasswd larry badpassword
        salt '*' apache.useradd /etc/httpd/htpasswd larry badpass opts=ns
    

    apache.server_status

    Get Information from the Apache server-status handler
    
    Note:
    
        The server-status handler is disabled by default.
        In order for this function to work it needs to be enabled.
        See http://httpd.apache.org/docs/2.2/mod/mod_status.html
    
    The following configuration needs to exists in pillar/grains.
    Each entry nested in ``apache.server-status`` is a profile of a vhost/server.
    This would give support for multiple apache servers/vhosts.
    
        apache.server-status:
          default:
            url: http://localhost/server-status
            user: someuser
            pass: password
            realm: 'authentication realm for digest passwords'
            timeout: 5
    
    CLI Examples:
    
        salt '*' apache.server_status
        salt '*' apache.server_status other-profile
    

    apache.config

    Create VirtualHost configuration files
    
    name
        File for the virtual host
    config
        VirtualHost configurations
    
    Note:
    
        This function is not meant to be used from the command line.
        Config is meant to be an ordered dict of all of the apache configs.
    
    CLI Example:
    
        salt '*' apache.config /etc/httpd/conf.d/ports.conf config="[{'Listen': '22'}]"
    

    apache.signal

    Signals httpd to start, restart, or stop.
    
    CLI Example:
    
        salt '*' apache.signal restart
    

    apache.vhosts

    Show the settings as parsed from the config file (currently
    only shows the virtualhost settings) (``apachectl -S``).
    Because each additional virtual host adds to the execution
    time, this command may require a long timeout be specified
    by using ``-t 10``.
    
    CLI Example:
    
        salt -t 10 '*' apache.vhosts
    

    apache.directives

    Return list of directives together with expected arguments
    and places where the directive is valid (``apachectl -L``)
    
    CLI Example:
    
        salt '*' apache.directives
    

    apache.userdel

    Delete HTTP user from the specified ``htpasswd`` file.
    
    CLI Example:
    
        salt '*' apache.userdel /etc/httpd/htpasswd larry
    

    apache.version

    Return server version (``apachectl -v``)
    
    CLI Example:
    
        salt '*' apache.version
    

    apache.modules

    Return list of static and shared modules (``apachectl -M``)
    
    CLI Example:
    
        salt '*' apache.modules
    

    apache.fullversion

    Return server version (``apachectl -V``)
    
    CLI Example:
    
        salt '*' apache.fullversion
    

    apache.servermods

    Return list of modules compiled into the server (``apachectl -l``)
    
    CLI Example:
    
        salt '*' apache.servermods
  • 相关阅读:
    eclipse禁用svg文件Validation
    在centos上安装jenkins
    5.volatile的应用
    4.资源限制
    linux git保存用户名密码(避免每次push输用户名密码)
    mysql 从库落后主库太多优化
    mfs使用指引
    Asura监控---AsuraMonitor,阿修罗监控开源
    docker overlay网络实现
    ELK+kafka日志收集
  • 原文地址:https://www.cnblogs.com/randomlee/p/Saltstack_module_apache.html
Copyright © 2011-2022 走看看