fix modules enabling code
This commit is contained in:
@@ -16,9 +16,9 @@ apache_use_stats: true
|
|||||||
apache_user: "{{ apache_server_name | regex_search( '([^.]+)' ) }}"
|
apache_user: "{{ apache_server_name | regex_search( '([^.]+)' ) }}"
|
||||||
apache_use_database: false
|
apache_use_database: false
|
||||||
apache_modules_list:
|
apache_modules_list:
|
||||||
headers
|
- headers
|
||||||
http2
|
- http2
|
||||||
rewrite
|
- rewrite
|
||||||
proxy
|
- proxy
|
||||||
proxy_http
|
- proxy_http
|
||||||
proxy_fcgi
|
- proxy_fcgi
|
||||||
|
|||||||
@@ -39,6 +39,14 @@
|
|||||||
- "{{ apache_base_dir }}/session"
|
- "{{ apache_base_dir }}/session"
|
||||||
- "{{ apache_base_dir }}/wsdlcache"
|
- "{{ apache_base_dir }}/wsdlcache"
|
||||||
|
|
||||||
|
- name: enable some modules
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
tags: modules
|
||||||
|
community.general.apache2_module:
|
||||||
|
state: present
|
||||||
|
name: "{{ item }}"
|
||||||
|
loop: "{{ apache_modules_list }}"
|
||||||
|
|
||||||
- name: dns setup
|
- name: dns setup
|
||||||
include_tasks: dns.yml
|
include_tasks: dns.yml
|
||||||
when: apache_use_dns
|
when: apache_use_dns
|
||||||
@@ -72,11 +80,3 @@
|
|||||||
when: apache_use_stats
|
when: apache_use_stats
|
||||||
tags: stats
|
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 }}"
|
|
||||||
@@ -11,10 +11,12 @@
|
|||||||
Options +indexes
|
Options +indexes
|
||||||
</Directory>
|
</Directory>
|
||||||
{%if apache_use_ssl %}
|
{%if apache_use_ssl %}
|
||||||
|
<IfModule rewrite>
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteCond %{HTTPS} off
|
RewriteCond %{HTTPS} off
|
||||||
RewriteCond %{REQUEST_URI} "!^/\.well-known"
|
RewriteCond %{REQUEST_URI} "!^/\.well-known"
|
||||||
RewriteRule (.*) https://%{SERVER_NAME}$1 [R,L]
|
RewriteRule (.*) https://%{SERVER_NAME}$1 [R,L]
|
||||||
|
</IfModule>
|
||||||
{%endif %}
|
{%endif %}
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user