- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Apache Logging to FIFO
Operating System - HP-UX
1822036
Members
3536
Online
109639
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 09:19 PM
06-29-2005 09:19 PM
Apache Logging to FIFO
Hi,
of course I first read the comments for the logging relevant directives in httpd.conf itself.
Then I also referenced the Apache online docs at
http://httpd.apache.org/docs/logs.html
But it didn't reveal how to accomplish this.
I tried simply creating a FIFO with mkfifo (or mknod) in $SERVER_ROOT$/logs/agent_log
(I first wanted to test with additional logging of clients' user agents)
# ll /app/brevis/apache/logs/agent_log
prw-r--r-- 1 root sys 0 Jun 30 09:57 /app/brevis/apache/logs/agent_log
In httpd.conf I added these (or simply uncommented in the case of Logfile format description for agent_log)
# grep -E '^(CustomLog|Log).*agent' httpd.conf
LogFormat "%{User-agent}i" agent
CustomLog /app/brevis/apache/logs/agent_log agent
and sent SIGUSR1 to master httpd to gracefully restart it.
When I simply had a
tail -f /app/brevis/apache/logs/agent_log
nothing got read from the fifo
I also tried a slightly modified path to the fifo by prepending a pipe symbol, as on does for instance when referring to an external program such as logrotate.
But then I got an entry in error_log on httpd receiving SIGUSR1, that the path to fifo above couldn't be executed.
Would I need to refer to an external logger such as syslog-ng for having Apache writing logs to fifos, or can this be accomplished with a plain Apache config hack?
Rgds.
Ralph
of course I first read the comments for the logging relevant directives in httpd.conf itself.
Then I also referenced the Apache online docs at
http://httpd.apache.org/docs/logs.html
But it didn't reveal how to accomplish this.
I tried simply creating a FIFO with mkfifo (or mknod) in $SERVER_ROOT$/logs/agent_log
(I first wanted to test with additional logging of clients' user agents)
# ll /app/brevis/apache/logs/agent_log
prw-r--r-- 1 root sys 0 Jun 30 09:57 /app/brevis/apache/logs/agent_log
In httpd.conf I added these (or simply uncommented in the case of Logfile format description for agent_log)
# grep -E '^(CustomLog|Log).*agent' httpd.conf
LogFormat "%{User-agent}i" agent
CustomLog /app/brevis/apache/logs/agent_log agent
and sent SIGUSR1 to master httpd to gracefully restart it.
When I simply had a
tail -f /app/brevis/apache/logs/agent_log
nothing got read from the fifo
I also tried a slightly modified path to the fifo by prepending a pipe symbol, as on does for instance when referring to an external program such as logrotate.
But then I got an entry in error_log on httpd receiving SIGUSR1, that the path to fifo above couldn't be executed.
Would I need to refer to an external logger such as syslog-ng for having Apache writing logs to fifos, or can this be accomplished with a plain Apache config hack?
Rgds.
Ralph
Madness, thy name is system administration
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2005 10:33 PM
06-30-2005 10:33 PM
Re: Apache Logging to FIFO
Try removing the full path and add a relative path , in ur case try using CustomLog logs/agent_log agent . In my case after creating the log file using mkfifo , i was not even able to restart the apache server using SIGUSR1. It just hangs during startup . So i used a normal agent_log file ( no fifo ) to log the user agents and was able to get the desired results. Y do u use fifo file , is there any specific need ?
Be Always Joy ......
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP