Skip to content
Snippets Groups Projects
Commit 5b40c488 authored by Martin van Es's avatar Martin van Es
Browse files

Add apache role

parent f0a1168c
Branches
No related tags found
No related merge requests found
Download GeoLite2 DB's from https://dev.maxmind.com/geoip/geolite2-free-geolocation-data
---
hosts:
alternative-mdx.pt-76.utr.surfcloud.nl:
hostname: srv4
[mdserver]
alternative-mdx.pt-76.utr.surfcloud.nl
[mdproxy]
alternative-mdx.pt-76.utr.surfcloud.nl
[geodns]
alternative-mdx.pt-76.utr.surfcloud.nl
[all:children]
mdserver
mdproxy
geodns
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
gather_facts: false gather_facts: false
roles: roles:
- {role: apache, tags: ['apache']} - {role: apache, tags: ['apache']}
- {role: mdserver, tags: ['mdserver']} #- {role: mdserver, tags: ['mdserver']}
- name: MDProxy - name: MDProxy
hosts: mdproxy hosts: mdproxy
gather_facts: false gather_facts: false
roles: roles:
- {role: apache, tags: ['apache']} - {role: apache, tags: ['apache']}
- {role: mdproxy, tags: ['mdserver']} #- {role: mdproxy, tags: ['mdproxy']}
---
- name: enable apache2 job
systemd:
name: "apache2.service"
enabled: true
state: "restarted"
daemon_reload: true
---
- name: Install packages
apt:
state: present
name:
- apache2
- name: Enable proxy_http mod
community.general.apache2_module:
name: proxy_http
state: present
- name: Create Apache conf
ansible.builtin.template:
src: "md.conf.j2"
dest: "/etc/apache2/sites-enabled/md.conf"
notify:
- "enable apache2 job"
<VirtualHost *:80>
ServerName {{ hosts[inventory_hostname]['hostname'] }}-signer.srv.mdx.incubator.geant.org
ServerAlias signer.srv.mdx.incubator.geant.org
DocumentRoot /var/www/html
AllowEncodedSlashes NoDecode
ProxyPass "/" "http://127.0.0.1:5001/" nocanon
ProxyPassReverse "/" "http://127.0.0.1:5001/"
</VirtualHost>
<VirtualHost *:80>
ServerName {{ hosts[inventory_hostname]['hostname'] }}-proxy.srv.mdx.incubator.geant.org
ServerAlias proxy.srv.mdx.incubator.geant.org
DocumentRoot /var/www/html
AllowEncodedSlashes NoDecode
ProxyPass "/" "http://127.0.0.1:5002/" nocanon
ProxyPassReverse "/" "http://127.0.0.1:5002/"
</VirtualHost>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment