wiki.getshifting.com

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


awshosteddokuwiki
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
awshosteddokuwiki [2025/07/20 05:51] – [Create CloudFront Distribution] sjoerdawshosteddokuwiki [2026/01/08 20:46] (current) – external edit 127.0.0.1
Line 403: Line 403:
 * You have divergent branches and need to specify how to reconcile them. * You have divergent branches and need to specify how to reconcile them.
   * Solution: {{{git config --global pull.rebase true}}}   * Solution: {{{git config --global pull.rebase true}}}
 +* Fatal: Not possible to fast-forward, aborting
 +  * Solution: {{{git pull --rebase}}}
  
 Always when you want to work with git on the server, follow the following steps: Always when you want to work with git on the server, follow the following steps:
Line 521: Line 523:
 * Click on 'Create snapshot' * Click on 'Create snapshot'
   * Name: wiki.getshifting.com-20250707   * Name: wiki.getshifting.com-20250707
 +
 +== Logs ==
 +
 +In the next step we will configure monitoring using AWS CloudWatch, in which we will also send the logs to Cloudwatch. For this we will change the format and naming of the apache logfiles, so we need to change [[https://docs.bitnami.com/aws/apps/wordpress/administration/configure-use-logrotate/ |logrotation]] as well.
 +
 +Let's start with an overview of the logfiles we are interested in:
 +
 +* Apache access log: {{{/opt/bitnami/apache/logs/access_log}}} which will be renamed to {{{/opt/bitnami/apache/logs/access_log_cloudwatch}}}
 +* Apache error log: {{{/opt/bitnami/apache/logs/error_log}}} which will be renamed to {{{/opt/bitnami/apache/logs/error_log_cloudwatch}}}
 +* Dokuwiki error log: {{{/opt/bitnami/apache/htdocs/data/log/error}}}
 +  * This file is already [[https://www.dokuwiki.org/config:logretain |rotated by dokuwiki itself]], so we don't need to change anything here
 +* Debian package log: {{{/var/log/dpkg.log}}}
 +  * This file is already rotated by logrotate, so we don't need to change anything here
 +
 +To change the logrotation for the apache logfiles, we need to change the logrotate settings file for apache located at {{{/etc/logrotate.d/apache}}}:
 +
 +//Original file content://
 +<code>
 +/opt/bitnami/apache/logs/*log {
 +  weekly
 +  rotate 150
 +  dateext
 +  compress
 +  copytruncate
 +  missingok
 +}
 +</code>
 +
 +//Modified file content://
 +<code>
 +/opt/bitnami/apache/logs/*log_cloudwatch {
 +  weekly
 +  rotate 26
 +  dateext
 +  compress
 +  copytruncate
 +  missingok
 +}
 +</code>
 +
 +Note that if any logfile are already present in {{{/opt/bitnami/apache/logs/}}} they can be removed, as they won't be rotated anymore.
  
 == Next Steps == == Next Steps ==
Line 554: Line 597:
  
 * The dokuwiki login doesn't work anymore, which is probably caused by the CloudFront distribution. This can be fixed by creating an invalidation ({{{/*}}}) for the CloudFront distribution, which will clear the cache and allow the login to work again. * The dokuwiki login doesn't work anymore, which is probably caused by the CloudFront distribution. This can be fixed by creating an invalidation ({{{/*}}}) for the CloudFront distribution, which will clear the cache and allow the login to work again.
 +
 +//This wiki has been made possible by://
 +
 +<HTML>
 +<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8613096447910897"
 +     crossorigin="anonymous"></script>
 +<!-- Wiki End of Page -->
 +<ins class="adsbygoogle"
 +     style="display:block"
 +     data-ad-client="ca-pub-8613096447910897"
 +     data-ad-slot="6221699236"
 +     data-ad-format="auto"
 +     data-full-width-responsive="true"></ins>
 +<script>
 +     (adsbygoogle = window.adsbygoogle || []).push({});
 +</script>
 +</HTML>
  
awshosteddokuwiki.1752990703.txt.gz · Last modified: by sjoerd