Ignore:
Timestamp:
2024-01-13T11:00:27+13:00 (5 months ago)
Author:
davidb
Message:

Getting the Apache2 reverse proxy going

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/ansible-playbooks/reverse-proxy-playbook.yml

    r38534 r38542  
    1 ##################################################
    2 # DO Community Playbooks: Apache on Ubuntu 18.04
    3 ##################################################
    41---
    52- hosts:      localhost
     
    2320      shell: /usr/sbin/a2enmod rewrite headers proxy proxy_http proxy_wstunnel
    2421
    25     - name: Create document root
    26       file:
    27         path: "/var/www/{{ http_host }}"
    28         state: directory
    29         owner: "{{ app_user }}"
    30         mode: '0755'
    31 
    32     - name: Copy index test page
    33       template:
    34         src: "files/index.html.j2"
    35         dest: "/var/www/{{ http_host }}/index.html"
    36 
    3722    - name: Set up Apache virtualhost
    3823      template:
    39         src: "files/apache.conf.j2"
    40         dest: "/etc/apache2/sites-available/{{ http_conf }}"
     24        src: "files/gs3-apache.conf.j2"
     25        dest: "/etc/apache2/sites-available/{{ apache2_http_conf }}"
    4126
    4227    - name: Enable new site
    43       shell: /usr/sbin/a2ensite {{ http_conf }}
     28      shell: /usr/sbin/a2ensite {{ apache2_http_conf }}
    4429      notify: Reload Apache
    4530
    46     - name: Disable default Apache site
    47       shell: /usr/sbin/a2dissite 000-default.conf
    48       when: disable_default
    49       notify: Reload Apache
    50 
    51     - name: "UFW - Allow HTTP on port {{ http_port }}"
    52       ufw:
    53         rule: allow
    54         port: "{{ http_port }}"
    55         proto: tcp
     31#    - name: "UFW - Allow HTTP on port {{ apache2_http_port }}"
     32#      ufw:
     33#        rule: allow
     34#        port: "{{ apache2_http_port }}"
     35#        proto: tcp
    5636
    5737  handlers:
Note: See TracChangeset for help on using the changeset viewer.