diff --git a/roles/copr/backend/files/lighttpd/access_log.conf b/roles/copr/backend/files/lighttpd/access_log.conf new file mode 100644 index 0000000000..7bded9f1d0 --- /dev/null +++ b/roles/copr/backend/files/lighttpd/access_log.conf @@ -0,0 +1,28 @@ +####################################################################### +## +## Corresponding documentation: +## +## https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModAccesslog +## +server.modules += ( "mod_accesslog" ) + +## +## Default access log. +## +#accesslog.filename = log_root + "/access.log" +accesslog.filename = "|/usr/sbin/cronolog /var/log/lighttpd/access.log" + +## +## The default format produces CLF compatible output. +## For available parameters see access.txt +## +#accesslog.format = "%h %l %u %t \"%r\" %b %>s \"%{User-Agent}i\" \"%{Referer}i\"" + +## +## If you want to log to syslog you have to unset the +## accesslog.use-syslog setting and uncomment the next line. +## +#accesslog.use-syslog = "enable" + +# +####################################################################### diff --git a/roles/copr/backend/files/lighttpd/lighttpd.conf b/roles/copr/backend/files/lighttpd/lighttpd.conf index ca2a606a5c..e8280864a9 100644 --- a/roles/copr/backend/files/lighttpd/lighttpd.conf +++ b/roles/copr/backend/files/lighttpd/lighttpd.conf @@ -483,3 +483,5 @@ $HTTP["url"] =~ "^/archive/spacewalk/($|/)" { dir-listing.activate = "disable" index-file.names = ( "index.html" ) } +# make sure logging use cronolog +server.max-worker = 6 # this may break many things diff --git a/roles/copr/backend/tasks/main.yml b/roles/copr/backend/tasks/main.yml index cce7c9101e..804b92bc15 100644 --- a/roles/copr/backend/tasks/main.yml +++ b/roles/copr/backend/tasks/main.yml @@ -21,6 +21,7 @@ - python2-neutronclient - python2-keystoneclient - php-cli + - cronolog # disable this in favor of excluding it in /etc/dnf/dnf.conf. # https://github.com/ansible/ansible/issues/33187 @@ -78,6 +79,11 @@ copy: src="boto" dest=/home/copr/.boto owner=copr group=copr # setup webserver +- name: add access_log.conf for lighttpd + copy: src="access_log.conf" dest=/etc/lighttpd/conf.d/access_log.conf owner=root group=root mode=0644 + notify: + - restart lighttpd + - name: add config for copr-repo path copy: src="{{ _lighttpd_conf_src }}" dest=/etc/lighttpd/lighttpd.conf owner=root group=root mode=0644 notify: