ptgbot: have apache cache backend
The static server in the ptgbot container is very simple; it will be much better to have apache caching the files which essentially never change. Change-Id: I8056d8c529c60f4b95aaca549528b6aa8465fa78
This commit is contained in:
parent
cced838bf0
commit
051aee9f16
@ -63,6 +63,9 @@
|
|||||||
state: present
|
state: present
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
|
- cache
|
||||||
|
- cache_disk
|
||||||
|
- cache_socache
|
||||||
- rewrite
|
- rewrite
|
||||||
- proxy
|
- proxy
|
||||||
- proxy_http
|
- proxy_http
|
||||||
@ -70,6 +73,14 @@
|
|||||||
- headers
|
- headers
|
||||||
- proxy_wstunnel
|
- proxy_wstunnel
|
||||||
|
|
||||||
|
- name: Ensure apache cache dir
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: '/var/cache/apache2/proxy'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: Copy apache config
|
- name: Copy apache config
|
||||||
template:
|
template:
|
||||||
src: ptgbot.vhost.config.j2
|
src: ptgbot.vhost.config.j2
|
||||||
|
@ -42,6 +42,18 @@
|
|||||||
SSLCertificateKeyFile /etc/letsencrypt-certs/ptg.opendev.org/ptg.opendev.org.key
|
SSLCertificateKeyFile /etc/letsencrypt-certs/ptg.opendev.org/ptg.opendev.org.key
|
||||||
SSLCertificateChainFile /etc/letsencrypt-certs/ptg.opendev.org/ca.cer
|
SSLCertificateChainFile /etc/letsencrypt-certs/ptg.opendev.org/ca.cer
|
||||||
|
|
||||||
|
# Enable SHM backend
|
||||||
|
CacheSocache shmcb
|
||||||
|
# disk fallback
|
||||||
|
CacheRoot "/var/cache/apache2/proxy"
|
||||||
|
# required to match on rewrites
|
||||||
|
CacheQuickHandler off
|
||||||
|
# don't pass requests to backend
|
||||||
|
CacheIgnoreCacheControl On
|
||||||
|
|
||||||
|
CacheEnable socache /
|
||||||
|
CacheEnable disk /
|
||||||
|
|
||||||
ProxyPass / http://localhost:8000/ retry=0
|
ProxyPass / http://localhost:8000/ retry=0
|
||||||
ProxyPassReverse / http://localhost:8000/
|
ProxyPassReverse / http://localhost:8000/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user