Skip to content

Commit

Permalink
expand logrotate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Nov 15, 2024
1 parent 6d4df5c commit e89b5fe
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion deploy/logrotate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,32 @@ Log uploads can be checked on the S3 bucket with the following command:

```
aws --profile doaj-nginx-logs s3 ls s3://doaj-nginx-logs
```
```

You can try a test run of `logrotate`:

```
sudo /usr/sbin/logrotate /etc/logrotate.conf
```

Or sync the files by directly running:

```
HOSTNAME=`hostname` sudo aws --profile doaj-nginx-logs s3 sync /var/log/nginx/ s3://doaj-nginx-logs/$HOSTNAME/ --exclude "*" --include "doaj.*.gz"
```


### Troubleshooting:

```
error: nginx:1 duplicate log entry for /var/log/nginx/doaj.access.log
error: found error in file nginx, skipping
```

Check whether you've disabled the default nginx configuration

```
The config profile (doaj-nginx-logs) could not be found
```

Check that root user has access to the AWS credentials and symlink if required.

0 comments on commit e89b5fe

Please sign in to comment.