Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Current »

(warning)  Problem

On 1.15.0 and develop, log rotation for NGINX is broken.

Develop version (up to the release date of Kasm version 1.16.0). A fix is planned for version 1.16.0 and after.


\uD83C\uDF31 Solution

Apply the following commands on each Kasm server with the affect versions.

sudo mkdir /opt/kasm/current/conf/logrotate
sudo vi /opt/kasm/current/conf/logrotate/logrotate.conf
# paste the following content into that file ^
/var/log/external/nginx/*.log {
        su nginx adm
        size 10k
        missingok
        rotate 20
        compress
        delaycompress
        notifempty
        sharedscripts
        postrotate
                if [ -f /var/run/nginx.pid ]; then
                        kill -USR1 `cat /var/run/nginx.pid`
                        nginx -s reload
                fi
        endscript
}
# end file content

sudo vi /opt/kasm/current/docker/docker-compose.yaml
# Edit this file ^, add a volume mapping to the proxy container  proxy:
    container_name: kasm_proxy
    image: "kasmweb/nginx:1.25.3"
    ports:
      - "443:443"
    networks:
      - kasm_default_network
    volumes:
      - /opt/kasm/1.15.0/conf/logrotate/logrotate.conf:/etc/logrotate.conf:ro


sudo docker rm -f kasm_proxy
sudo /opt/kasm/bin/start

# Test that rotation is working
sudo docker exec -it kasm_proxy /usr/sbin/logrotate -v /etc/logrotate.conf
ls -l /opt/kasm/current/log/nginx


❌ Impacted Versions:

Issues were first observed on the following versions, but may impact other versions as well.

  • 1.15.0

  • develop (up to the release date of Kasm version 1.16.0)

(tick) Resolved Versions:

The issue is no longer applicable for the following and newer versions.

  • None

📖 Related Docs:

  • None

  • None

  • No labels