Initial commit: mod_reqin_log Apache module
Features: - JSON logging of HTTP requests to Unix domain socket - Configurable HTTP headers logging (flat JSON structure) - Header value truncation and count limits - Automatic reconnect on socket disconnection - Error reporting with throttling Configuration directives: - JsonSockLogEnabled: Enable/disable logging - JsonSockLogSocket: Unix socket path - JsonSockLogHeaders: List of headers to log - JsonSockLogMaxHeaders: Maximum headers to log - JsonSockLogMaxHeaderValueLen: Max header value length - JsonSockLogReconnectInterval: Reconnect delay - JsonSockLogErrorReportInterval: Error log throttle Includes: - Module source code (src/) - Unit and integration tests (tests/, scripts/) - Documentation (README.md, architecture.yml) - Build configuration (CMakeLists.txt, Makefile) - Packaging (deb/rpm) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
53
packaging/rpm/mod_reqin_log.spec
Normal file
53
packaging/rpm/mod_reqin_log.spec
Normal file
@ -0,0 +1,53 @@
|
||||
Name: mod_reqin_log
|
||||
Version: 1.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Apache HTTPD module for logging HTTP requests as JSON to Unix socket
|
||||
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/example/mod_reqin_log
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: httpd
|
||||
BuildRequires: httpd-devel
|
||||
BuildRequires: apr-devel
|
||||
BuildRequires: apr-util-devel
|
||||
|
||||
Requires: httpd
|
||||
|
||||
%description
|
||||
mod_reqin_log is an Apache HTTPD 2.4 module that logs all incoming HTTP requests
|
||||
as JSON lines to a Unix domain socket. The logging occurs at request reception
|
||||
time (post_read_request phase), capturing input-side data without waiting for
|
||||
application processing.
|
||||
|
||||
Features:
|
||||
- Non-blocking I/O to avoid stalling worker processes
|
||||
- Configurable header logging with truncation support
|
||||
- Automatic reconnection to Unix socket on failure
|
||||
- Throttled error reporting to Apache error_log
|
||||
- Compatible with prefork, worker, and event MPMs
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%{__make} %{?_smp_mflags} APXS=%{_bindir}/apxs
|
||||
|
||||
%install
|
||||
%{__make} install DESTDIR=%{buildroot} APXS=%{_bindir}/apxs
|
||||
|
||||
# Install configuration file
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
|
||||
install -m 644 conf/mod_reqin_log.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/
|
||||
|
||||
%files
|
||||
%{_libdir}/httpd/modules/mod_reqin_log.so
|
||||
%config(noreplace) %{_sysconfdir}/httpd/conf.d/mod_reqin_log.conf
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Thu Feb 26 2026 Developer <dev@example.com> - 1.0.0-1
|
||||
- Initial package release
|
||||
Reference in New Issue
Block a user