This adds an option to have an Apache based reverse proxy on port 3081 forwarding to 3000. The idea is that we can use some of the Apache filtering rules to reject certain traffic if/when required. It is off by default, but tested in the gate. Change-Id: Ie34772878d9fb239a5f69f2d7b993cc1f2142930changes/21/738721/4
parent
96fc5ea416
commit
870f664648
@ -1 +1,2 @@
|
||||
gitea_no_log: true
|
||||
gitea_reverse_proxy: false
|
||||
|
@ -0,0 +1,4 @@
|
||||
- name: gitea Reload apache2
|
||||
service:
|
||||
name: apache2
|
||||
state: reloaded
|
@ -0,0 +1,26 @@
|
||||
- name: Install apache2
|
||||
apt:
|
||||
name:
|
||||
- apache2
|
||||
- apache2-utils
|
||||
state: present
|
||||
|
||||
- name: Apache modules
|
||||
apache2_module:
|
||||
state: present
|
||||
name: "{{ item }}"
|
||||
loop:
|
||||
- rewrite
|
||||
- proxy
|
||||
- proxy_http
|
||||
- ssl
|
||||
- headers
|
||||
|
||||
- name: Copy apache config
|
||||
template:
|
||||
src: gitea.vhost.j2
|
||||
dest: /etc/apache2/sites-enabled/000-default.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: gitea Reload apache2
|
@ -0,0 +1,30 @@
|
||||
Listen 3081
|
||||
|
||||
<VirtualHost *:3081>
|
||||
ServerName {{ inventory_hostname }}
|
||||
ServerAdmin infra-root@opendev.org
|
||||
|
||||
AllowEncodedSlashes On
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/gitea-ssl-error.log
|
||||
|
||||
LogLevel warn
|
||||
|
||||
CustomLog ${APACHE_LOG_DIR}/gitea-ssl-access.log combined
|
||||
|
||||
SSLEngine on
|
||||
SSLProtocol All -SSLv2 -SSLv3
|
||||
# Note: this list should ensure ciphers that provide forward secrecy
|
||||
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:!AES256:!aNULL:!eNULL:!MD5:!DSS:!PSK:!SRP
|
||||
SSLHonorCipherOrder on
|
||||
|
||||
SSLCertificateFile /etc/letsencrypt-certs/{{ inventory_hostname }}/{{ inventory_hostname }}.cer
|
||||
SSLCertificateKeyFile /etc/letsencrypt-certs/{{ inventory_hostname }}/{{ inventory_hostname }}.key
|
||||
SSLCertificateChainFile /etc/letsencrypt-certs/{{ inventory_hostname }}/ca.cer
|
||||
|
||||
SSLProxyEngine on
|
||||
|
||||
ProxyPass / https://localhost:3000/ retry=0
|
||||
ProxyPassReverse / https://localhost:3000/
|
||||
|
||||
</VirtualHost>
|
Loading…
Reference in new issue