diff --git a/defaults/main.yml b/defaults/main.yml index 7b1c407..8ca40a2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,3 +15,10 @@ apache_use_ssl: true apache_use_stats: true apache_user: "{{ apache_server_name | regex_search( '([^.]+)' ) }}" apache_use_database: false +apache_modules_list: + headers + http2 + rewrite + proxy + proxy_http + proxy_fcgi diff --git a/tasks/main.yml b/tasks/main.yml index ab9a036..8be0d36 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -70,4 +70,13 @@ - name: goaccess import_tasks: goaccess.yml when: apache_use_stats - tags: stats \ No newline at end of file + tags: stats + + +- name: enable some modules + when: ansible_os_family == 'Debian' + tags: modules + community.general.apache2_module: + state: present + name: "{{ item }}" + loop: "{{ apache_modules list }}" \ No newline at end of file diff --git a/templates/vhost.conf.jj b/templates/vhost.conf.jj index a471f64..0557f12 100644 --- a/templates/vhost.conf.jj +++ b/templates/vhost.conf.jj @@ -26,6 +26,7 @@ ServerAlias {{ alias }} {%endfor%} {%endif%} + Protocols h2 http/1.1 DocumentRoot {{ apache_document_root }} SSLEngine on SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1