Apache httpd error

Apache httpd error ๋กœ๊ทธ ์ˆ˜์ง‘ ๋ฐฉ๋ฒ• ์•ˆ๋‚ด

1. conf ์„ค์ •(rsyslog ์‚ฌ์šฉ)

  • 80-httpd.conf > conf ํŒŒ์ผ ์ƒ์„ฑํ•˜๊ธฐ

cd /etc/rsyslog.d/
vi /etc/rsyslog.d/80-httpd.conf

2. conf ํŒŒ์ผ ์ƒ์„ฑ

File = "๋กœ๊ทธ ๊ฒฝ๋กœ", Tag = "ํƒœ๊ทธ", Severity = "์‹ฌ๊ฐ๋„", programname ="โ€œํ”„๋กœ๊ทธ๋žจ๋ช…"
vi /etc/rsyslog.d/80-httpd.conf
#variables required for non-syslog log file forwarding โ€“ httpd error log file
#edit on your location

input(type=โ€imfileโ€
File=โ€/var/log/httpd/error_logโ€
Tag=โ€httpdโ€
Severity=โ€errorโ€
Facility=โ€local7โ€ณ)

###### Creates a template for each log file in the Logentries UI
### logic to apply the relevant templates to the different log files

if $programname == โ€˜httpdโ€˜ then /var/log/plura/ceelog-127.0.0.1.log;CEETemplate
:programname, isequal, โ€˜httpdโ€˜ stop

2-1. repo ์—์„œ ๋‹ค์šด๋กœ๋“œ ๋ฐ›๊ธฐ

wget https://repo.plura.io/v5/module/rsyslog/80-httpd.conf
curl https://repo.plura.io/v5/module/rsyslog/80-httpd.conf -o /etc/rsyslog.d/80-httpd.conf

3. rsyslog ๋ฐ๋ชฌ ์žฌ์‹œ์ž‘

service rsyslog restart

4. ํƒ์ง€ ํ™•์ธ

https://docs.plura.io/ko/fn/comm/filter/syslog

์ฐธ๊ณ  ์‚ฌ์ดํŠธ

https://www.rsyslog.com/doc/v8-stable/configuration/modules/imfile.html

Last updated