+
    i  c                   sj    ^ RI HtHtHtHtHt  ! R R]4      t ! R R]]4      t ! R R]]]4      tR# )	i    )PluginRedHatPluginDebianPluginUbuntuPlugin	PluginOptc                   sZ   a  ] tR t^t o RtRtRtRtRtRt	Rt
]! RRRR7      .tR	 tR
tV tR# )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.
zApache http daemonZapacheNlogFzgathers all apache logs)ZnameZdefaultZdescc           
     s    V P                  R R.RR7       V P                  RRR7       . ROpT P                  V Uu. uF  pRV P                   RV R	2NK  	  up4       R
# u upi )zapachectl -Szapachectl -tT)Z
cmd_as_tagzapachectl -MZhttpd_MZtagsz	/var/log/z*/Z*N)ZaodhZ
ceilometerZcinderZforemanZgnocchiZhorizonZkeystoneZmanilaZnovaZoctaviaZ	placementZpulp)Zadd_cmd_outputadd_forbidden_path	apachepkg)selfZsubdirsZsubs   &  >/usr/lib/python3.14/site-packages/sos/report/plugins/apache.pysetupZApache.setup'   s    
  	 	 	N;
 	<C!
<CSi'r#a0G!
 	 !
s   A! )Z	webserverZ	openshift)httpd)z	/var/www/)__name__
__module____qualname____firstlineno____doc__Z
short_descZplugin_nameZprofilesZpackagesfilesr	   r   Zoption_listr   __static_attributes____classdictcell__)__classdict__s   @r   r   r      sJ      &JK)HHEI 	ue2KLK     r   c                   sD   a a ] tR t^Dt oRtRtRtV 3R ltR tRt	Vt
V ;t# )RedHatApacheab  
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.
r   c           
     s  < V P                  R RRRRRRR/4       \        SV `	  4        . ROpV Uu. uF  pRV 2NK
  	  pp. ROpV Uu. uF  pR	V 2NK
  	  pp. ROpT P                  V Uu. uF  qw R
2NK	  	  up4       V F$  pV F  p	V P	                  V RV	 2RR7       K  	  K&  	  V P                  R4      '       g   V P                  R4      '       d   V P	                  V4       M(V F"  p
V F  pV P	                  V
 RV 24       K  	  K$  	  V P	                  R.4       V P                  R.4       V P                  RRR7       R# u upi u upi u upi )z/var/log/httpd/access_logZhttpd_access_logz/var/log/httpd/error_logZhttpd_error_logz/var/log/httpd/ssl_access_logZhttpd_ssl_access_logz/var/log/httpd/ssl_error_logZhttpd_ssl_error_logz
/etc/httpdz/var/log/httpdz/conf/password.confZ/Z
httpd_confr   r   all_logsz/var/lib/httpd/*z/var/lib/httpd/*.pemr   Zsystemctl_httpdN)Z Z22Z24)zconf/*.confzconf.d/*.confzconf.modules.d/*.conf)Z
access_logZ	error_logZssl_access_logZssl_error_log)Zadd_file_tagssuperr   r   add_copy_spec
get_optionadd_service_status)r
   ZversZverZetcdirsZconfsZlogdirsZlogsZetcZedirZconfZldirr   	__class__s   &           r   r   ZRedHatApache.setupU   s   ');&(9+-C*,A	
 	 	   266#Zu%6
 6::Tc^C5)T:
 	3:!
3:Ce&'7!
 	 D""dV1TF#3,"G   ??5!!T__Z%@%@w'C&&$q7     	
 	 	"!
 	 	.?@Q 7 ;!
s   E	E,Ec                sR    V P                  R RR4       V P                  R RR4       R# )z/var/lib/httpd/.*jsonz(\"e\"\s*:|\"n\"\s*:)(.*[,]$)z\1 ********,z(\"e\"\s*:|\"n\"\s*:)(.*[^,]$)z\1 ********N)Zdo_path_regex_sub)r
   s   &r   postprocZRedHatApache.postproc   s4      	#,	

 	#-	
r   r   )z/etc/httpd/conf/httpd.confz/etc/httpd22/conf/httpd.confz/etc/httpd24/conf/httpd.conf)r   r   r   r   r   r   r	   r   r    r   r   __classcell__r   r      @@r   r   r   D   s)     E
 I8At
 
r   r   c                   s:   a a ] tR t^t oRtRtV 3R ltRtVtV ;t	# )DebianApacheapache2c                s  < \         SV `  4        V P                  R R.4       V P                  R4       V P                  . RO4       V P	                  R4      '       g   V P	                  R4      '       d   V P                  R.4       R# R# )z/etc/apache2/*z/etc/default/apache2r%   r   r   z/var/log/apache2N)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.log)r   r   r   r   r   )r
   r   s   &r   r   ZDebianApache.setup   s    "
 	
 		* 	 
 	 ??5!!T__Z%@%@"   &Ar   r   )z/etc/apache2/apache2.conf)
r   r   r   r   r   r	   r   r   r   r!   r"   r#   r   r$   r$      s     *EI r   r$   N)	Zsos.report.pluginsr    r   r   r   r   r   r   r$   r   r   r   <module>r&      s=   9 94V 4nd
6< d
N6< r   