Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
tildes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
Tildes
tildes
Commits
f880ab9e
You need to sign in or sign up before continuing.
Commit
f880ab9e
authored
5 years ago
by
Deimos
Browse files
Options
Downloads
Patches
Plain Diff
Salt: add logrotate config for nginx logs
parent
d04da960
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
salt/salt/nginx/init.sls
+8
-0
8 additions, 0 deletions
salt/salt/nginx/init.sls
salt/salt/nginx/logrotate
+15
-0
15 additions, 0 deletions
salt/salt/nginx/logrotate
with
23 additions
and
0 deletions
salt/salt/nginx/init.sls
+
8
−
0
View file @
f880ab9e
...
...
@@ -23,3 +23,11 @@ nginx:
- user: root
- group: root
- mode: 644
# Add logrotate config to rotate daily and delete after 30 days
/etc/logrotate.d/nginx:
file.managed:
- source: salt://nginx/logrotate
- user: root
- group: root
- mode: 644
This diff is collapsed.
Click to expand it.
salt/salt/nginx/logrotate
0 → 100644
+
15
−
0
View file @
f880ab9e
/var/log/nginx/*.log {
daily
missingok
rotate 30
compress
delaycompress
notifempty
create 640 nginx adm
sharedscripts
postrotate
if [ -f /var/run/nginx.pid ]; then
kill -USR1 `cat /var/run/nginx.pid`
fi
endscript
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment