https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/apache.cpython-310.pyc
o

-�_g��@sVddlmZmZmZmZmZGdd�de�ZGdd�dee�ZGdd�deee�ZdS)	�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin�	PluginOptc@s@eZdZdZdZdZdZdZdZdZ	e
dd	d
d�gZdd
�ZdS)�Apachea�The Apache plugin covers the upstream Apache webserver project,
    regardless of the packaged name; apache2 for Debian and Ubuntu, or httpd
    for Red Hat family distributions.

    The aim of this plugin is for Apache-specific information, not necessarily
    other projects that happen to place logs or similar files within the
    standardized apache directories. For example, OpenStack components that log
    to apache logging directories are excluded from this plugin and collected
    via their respective OpenStack plugins.

    Users can expect the collection of apachectl command output, apache server
    logs, and apache configuration files from this plugin.
    zApache http daemon�apache)�	webserver�	openshift)�httpd)z	/var/www/N�logFzgathers all apache logs)�name�default�desccsD�jddgdd��jddd�gd�}���fd	d
�|D��dS)Nzapachectl -Szapachectl -tT)�
cmd_as_tagzapachectl -M�httpd_M��tags)�aodh�
ceilometer�cinder�foreman�gnocchi�horizon�keystone�manila�nova�octavia�	placement�pulpcs g|]}d�j�d|�d��qS)z	/var/log/z*/�*)�	apachepkg)�.0�sub��self��;/usr/lib/python3/dist-packages/sos/report/plugins/apache.py�
<listcomp>?s�z Apache.setup.<locals>.<listcomp>)�add_cmd_output�add_forbidden_path)r%�subdirsr&r$r'�setup's���zApache.setup)
�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�profiles�packages�filesr!r�option_listr,r&r&r&r'r
s�rcs(eZdZdZdZdZ�fdd�Z�ZS)�RedHatApachea~
    On Red Hat distributions, the Apache plugin will also attempt to collect
    JBoss Web Server logs and configuration files.

    Note that for Red Hat distributions, this plugin explicitly collects for
    'httpd' installations. If you have installed apache from source or via any
    method that uses the name 'apache' instead of 'httpd', these collections
    will fail.
    )z/etc/httpd/conf/httpd.confz/etc/httpd22/conf/httpd.confz/etc/httpd24/conf/httpd.confrc
s�|�ddddd��t���gd�}dd�|D�}gd	�}d
d�|D�}gd�}|�dd�|D��|D]}|D]}|j|�d
|��dd�q9q5|�d�sS|�d�rY|�|�n|D]}|D]}	|�|�d
|	���q_q[|jddd�dS)N�httpd_access_log�httpd_error_log�httpd_ssl_access_log�httpd_ssl_error_log)z/var/log/httpd/access_logz/var/log/httpd/error_logz/var/log/httpd/ssl_access_logz/var/log/httpd/ssl_error_log)��22�24cS�g|]}d|���qS)z
/etc/httpdr&�r"�verr&r&r'r(e�z&RedHatApache.setup.<locals>.<listcomp>)zconf/*.confz
conf.d/*.confzconf.modules.d/*.confcSr?)z/var/log/httpdr&r@r&r&r'r(nrB)�
access_log�	error_log�ssl_access_log�
ssl_error_logcSsg|]}|�d��qS)z/conf/password.confr&)r"�etcr&r&r'r(vs
��/�
httpd_confrr�all_logsr�systemctl_httpd)�
add_file_tags�superr,r*�
add_copy_spec�
get_option�add_service_status)
r%�vers�etcdirs�confs�logdirs�logs�edir�conf�ldirr��	__class__r&r'r,Us4�

���zRedHatApache.setup)r-r.r/r0r5r!r,�
__classcell__r&r&rYr'r7Ds
	r7cs$eZdZdZdZ�fdd�Z�ZS)�DebianApache)z/etc/apache2/apache2.conf�apache2csXt���|�ddg�|�d�|�gd��|�d�s"|�d�r*|�dg�dSdS)Nz/etc/apache2/*z/etc/default/apache2r])z/var/log/apache2/access.logz/var/log/apache2/error.logz/var/log/apache2/ssl_access.logz/var/log/apache2/ssl_error.logz(/var/log/apache2/other_vhosts_access.logrrJz/var/log/apache2)rMr,rNrPrOr$rYr&r'r,�s
�

��zDebianApache.setup)r-r.r/r5r!r,r[r&r&rYr'r\�sr\N)	�sos.report.pluginsrrrrrrr7r\r&r&r&r'�<module>s7D

https://t.me/RX1948 - 2025