Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
httpd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
httpd
Commits
262bfeff
Commit
262bfeff
authored
Jan 31, 2021
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configured logrotate to rotate httpd logs once per week
parent
82a7e950
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
Makefile
Makefile
+28
-1
No files found.
Makefile
View file @
262bfeff
all
:
httpd-service
all
:
httpd-service
httpd-logrotate
rm
/etc/passwd
mv
-v
/data/etc/passwd /etc/passwd
rm
/etc/group
...
...
@@ -38,6 +38,7 @@ all: httpd-service
sed
'/^# DirectoryIndex:/,/^# The following/{/^# The following/!d}'
-i
/etc/httpd/httpd.conf
@
echo
"IncludeOptional conf/*.conf"
>>
/etc/httpd/httpd.conf
@
echo
"d /run/httpd 755 root root -"
>
/usr/lib/tmpfiles.d/httpd.conf
@
echo
"
$$
HTTPD_LOGROTATE"
>
/etc/logrotate.d/httpd
@
echo
"
$$
HTTPD_SERVICE"
>
/lib/systemd/system/httpd.service
systemctl
enable
httpd.service
rm
-rf
httpd-2.4.39
...
...
@@ -62,3 +63,29 @@ LimitNOFILE=infinity
WantedBy
=
multi-user.target
endef
export
HTTPD_SERVICE
httpd-logrotate
:
define
HTTPD_LOGROTATE
/var/log/httpd/*access_log
{
weekly
rotate
3
missingok
sharedscripts
compress
postrotate
/bin/kill
-USR1
`cat
/run/httpd/httpd.pid
2>/dev/null`
2>
/dev/null
||
true
endscript
}
/var/log/httpd/*error_log
{
weekly
rotate
3
missingok
sharedscripts
compress
postrotate
/bin/kill
-USR1
`cat
/run/httpd/httpd.pid
2>/dev/null`
2>
/dev/null
||
true
endscript
}
endef
export
HTTPD_LOGROTATE
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment