From e78f97bfbb785cc9ec0c5e36254a162993563ea6 Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Aug 24 2018 10:00:19 +0000 Subject: Move copr.conf to templates, it has jinja2 macros --- diff --git a/roles/copr/frontend/files/httpd/coprs.conf b/roles/copr/frontend/files/httpd/coprs.conf deleted file mode 100644 index 453144a..0000000 --- a/roles/copr/frontend/files/httpd/coprs.conf +++ /dev/null @@ -1,56 +0,0 @@ -NameVirtualHost *:80 -LoadModule wsgi_module modules/mod_wsgi.so -WSGISocketPrefix /var/run/wsgi -Alias /robots.txt /var/www/html/robots.txt - -WSGIDaemonProcess 127.0.0.1 user=copr-fe group=copr-fe threads=15 display-name=other maximum-requests=8000 graceful-timeout=20 -WSGIDaemonProcess api user=copr-fe group=copr-fe threads=15 display-name=api maximum-requests=8000 graceful-timeout=20 -WSGIDaemonProcess backend user=copr-fe group=copr-fe threads=15 display-name=backend maximum-requests=8000 graceful-timeout=20 -WSGIDaemonProcess stats user=copr-fe group=copr-fe threads=15 display-name=stats maximum-requests=8000 graceful-timeout=20 -WSGIDaemonProcess tmp user=copr-fe group=copr-fe threads=15 display-name=tmp maximum-requests=8000 graceful-timeout=20 -WSGIScriptAlias / /usr/share/copr/coprs_frontend/application - - - ServerName copr.fedorainfracloud.org - ServerAlias copr-fe.cloud.fedoraproject.org - WSGIPassAuthorization On - - - WSGIProcessGroup 127.0.0.1 - - - #ErrorLog logs/error_coprs - #CustomLog logs/access_coprs common - - - WSGIApplicationGroup %{GLOBAL} - Require all granted - - - -{% if devel %} - - RewriteEngine on - RewriteRule ^/\.well-known/(.*) /srv/web/acme-challenge/.well-known/$1 [L] - RewriteRule "^/?(.*)" "https://%{HTTP_HOST}/$1" [L,R=301,NE] - -{% endif %} - - -ExtendedStatus On - - - SetHandler server-status - Require all denied - Require host localhost .redhat.com - - - - - StartServers 8 - MinSpareServers 8 - MaxSpareServers 20 - MaxClients 50 - MaxRequestsPerChild 10000 - - diff --git a/roles/copr/frontend/tasks/main.yml b/roles/copr/frontend/tasks/main.yml index bdb75fc..558f07a 100644 --- a/roles/copr/frontend/tasks/main.yml +++ b/roles/copr/frontend/tasks/main.yml @@ -48,6 +48,12 @@ copy: src="httpd/{{ item }}" dest="/etc/httpd/conf.d/{{ item }}" with_items: - "welcome.conf" + tags: + - config + +- name: copy apache files to conf.d (templates) + template: src="httpd/{{ item }}" dest="/etc/httpd/conf.d/{{ item }}" + with_items: - "coprs.conf" tags: - config diff --git a/roles/copr/frontend/templates/httpd/coprs.conf b/roles/copr/frontend/templates/httpd/coprs.conf new file mode 100644 index 0000000..453144a --- /dev/null +++ b/roles/copr/frontend/templates/httpd/coprs.conf @@ -0,0 +1,56 @@ +NameVirtualHost *:80 +LoadModule wsgi_module modules/mod_wsgi.so +WSGISocketPrefix /var/run/wsgi +Alias /robots.txt /var/www/html/robots.txt + +WSGIDaemonProcess 127.0.0.1 user=copr-fe group=copr-fe threads=15 display-name=other maximum-requests=8000 graceful-timeout=20 +WSGIDaemonProcess api user=copr-fe group=copr-fe threads=15 display-name=api maximum-requests=8000 graceful-timeout=20 +WSGIDaemonProcess backend user=copr-fe group=copr-fe threads=15 display-name=backend maximum-requests=8000 graceful-timeout=20 +WSGIDaemonProcess stats user=copr-fe group=copr-fe threads=15 display-name=stats maximum-requests=8000 graceful-timeout=20 +WSGIDaemonProcess tmp user=copr-fe group=copr-fe threads=15 display-name=tmp maximum-requests=8000 graceful-timeout=20 +WSGIScriptAlias / /usr/share/copr/coprs_frontend/application + + + ServerName copr.fedorainfracloud.org + ServerAlias copr-fe.cloud.fedoraproject.org + WSGIPassAuthorization On + + + WSGIProcessGroup 127.0.0.1 + + + #ErrorLog logs/error_coprs + #CustomLog logs/access_coprs common + + + WSGIApplicationGroup %{GLOBAL} + Require all granted + + + +{% if devel %} + + RewriteEngine on + RewriteRule ^/\.well-known/(.*) /srv/web/acme-challenge/.well-known/$1 [L] + RewriteRule "^/?(.*)" "https://%{HTTP_HOST}/$1" [L,R=301,NE] + +{% endif %} + + +ExtendedStatus On + + + SetHandler server-status + Require all denied + Require host localhost .redhat.com + + + + + StartServers 8 + MinSpareServers 8 + MaxSpareServers 20 + MaxClients 50 + MaxRequestsPerChild 10000 + +