Mitch
April 9, 2022, 12:40am
#1
I failed this task even though I replaced all the and’s with for’s…
Make sure to replace all the occurences of ‘and’ to ‘for’ in ‘/home/BSD_REPLACE.txt’ on stapp02
[steve@stapp02 ~]$ sudo grep and /home/BSD_REPLACE.txt
[sudo] password for steve:
[steve@stapp02 ~]$
Mitch
April 9, 2022, 12:54am
#2
Got another task to disable directory listing in /var/www/html/media, so I set “Options -Indexes +FollowSymLinks” in the httpd.conf, and then it told me I failed because it wasn’t exposing the Apache version…???
Mitch
April 9, 2022, 1:12am
#3
This one told me to install haproxy and configure logrotate to do monthly and only keep 3 copies.
logrotate conf ‘/etc/logrotate.d/haproxy’ not configured correctly for logs rotation on stapp01
thor@jump_host ~$ for user in tony@stapp01 steve@stapp02 banner@stapp03 ; do ssh -t ${user} “sudo sed -i ‘s/daily/monthly/;s/rotate 10/rotate 3/’ /etc/logrotate.d/haproxy” ; done
[sudo] password for tony:
Connection to stapp01 closed.
[sudo] password for steve:
Connection to stapp02 closed.
[sudo] password for banner:
Connection to stapp03 closed.
thor@jump_host ~$ ssh tony@stapp01
Last login: Sat Apr 9 01:08:22 2022 from jump_host.linux-logrotate-v2_app_net
[tony@stapp01 ~]$ cat /etc/logrotate.d/haproxy
/var/log/haproxy.log {
monthly
rotate 3
missingok
notifempty
compress
sharedscripts
postrotate
/bin/kill -HUP cat /var/run/syslogd.pid 2> /dev/null
2> /dev/null || true
/bin/kill -HUP cat /var/run/rsyslogd.pid 2> /dev/null
2> /dev/null || true
endscript
}
Hi @Mitch ,
Could you please share the “Review” link?
Regards,
KodeKloud Support