Преглед изворни кода

Move NameVirtualHost directives to ports.conf

Luke Cyca пре 10 година
родитељ
комит
c697e135e9

+ 0
- 3
roles/blog/templates/etc_apache2_sites-available_blog.j2 Прегледај датотеку

1
-NameVirtualHost *:80
2
-
3
 <VirtualHost *:80>
1
 <VirtualHost *:80>
4
     ServerName {{ blog_domain }}
2
     ServerName {{ blog_domain }}
5
     ServerAlias www.{{ blog_domain }}
3
     ServerAlias www.{{ blog_domain }}
7
     Redirect / https://{{ blog_domain }}/
5
     Redirect / https://{{ blog_domain }}/
8
 </VirtualHost>
6
 </VirtualHost>
9
 
7
 
10
-NameVirtualHost *:443
11
 
8
 
12
 <VirtualHost *:443>
9
 <VirtualHost *:443>
13
     ServerName {{ blog_domain }}
10
     ServerName {{ blog_domain }}

+ 3
- 0
roles/common/tasks/ssl.yml Прегледај датотеку

13
 
13
 
14
 - name: Enable Apache SSL module
14
 - name: Enable Apache SSL module
15
   command: a2enmod ssl creates=/etc/apache2/mods-enabled/ssl.load
15
   command: a2enmod ssl creates=/etc/apache2/mods-enabled/ssl.load
16
+
17
+- name: Enable NameVirtualHost for HTTPS
18
+  lineinfile: dest=/etc/apache2/ports.conf regexp='^    NameVirtualHost \*:443' insertafter='^<IfModule mod_ssl.c>' line='    NameVirtualHost *:443'

+ 0
- 2
roles/owncloud/templates/etc_apache2_sites-available_owncloud.j2 Прегледај датотеку

1
-NameVirtualHost *:443
2
-
3
 <VirtualHost *:443>
1
 <VirtualHost *:443>
4
     ServerName {{ owncloud_domain }}
2
     ServerName {{ owncloud_domain }}
5
 
3
 

Loading…
Откажи
Сачувај