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

More apache fixes.

The virtual site files must be owned by root (serious security issue)
and they must have the .conf filename suffix for a2ensite on
Ubuntu 14.04LTS (apache 2.4.7).
Sven Neuhaus пре 11 година
родитељ
комит
0f6dfdc6ca

+ 2
- 2
roles/blog/tasks/blog.yml Прегледај датотеку

@@ -2,10 +2,10 @@
2 2
   file: state=directory path=/var/www/{{ domain }} group=www-data owner=www-data
3 3
 
4 4
 - name: Configure the Apache HTTP server for the blog
5
-  template: src=etc_apache2_sites-available_blog.j2 dest=/etc/apache2/sites-available/{{ domain }} group=www-data owner=www-data
5
+  template: src=etc_apache2_sites-available_blog.j2 dest=/etc/apache2/sites-available/{{ domain }}.conf group=root owner=root
6 6
   notify: restart apache
7 7
 
8 8
 - name: Enable blog site
9
-  command: a2ensite {{ domain }} creates=/etc/apache2/sites-enabled/{{ domain }}
9
+  command: a2ensite {{ domain }}.conf creates=/etc/apache2/sites-enabled/{{ domain }}.conf
10 10
   notify: restart apache
11 11
 

+ 4
- 4
roles/git/tasks/cgit.yml Прегледај датотеку

@@ -34,9 +34,9 @@
34 34
 
35 35
 - name: Configure the Apache HTTP server for cgit
36 36
   template: src=etc_apache2_sites-available_cgit.j2
37
-            dest=/etc/apache2/sites-available/cgit
38
-            group=www-data
39
-            owner=www-data
37
+            dest=/etc/apache2/sites-available/cgit.conf
38
+            group=root
39
+            owner=root
40 40
   notify: restart apache
41 41
 
42 42
 - name: Enable Apache cgi module
@@ -48,5 +48,5 @@
48 48
   notify: restart apache
49 49
 
50 50
 - name:  Enable cgit site
51
-  command: a2ensite cgit creates=/etc/apache2/sites-enabled/cgit
51
+  command: a2ensite cgit.conf creates=/etc/apache2/sites-enabled/cgit.conf
52 52
   notify: restart apache

+ 5
- 5
roles/newebe/tasks/main.yml Прегледај датотеку

@@ -73,12 +73,12 @@
73 73
 #
74 74
 - name: Configure the Apache HTTP server for Newebe
75 75
   template: src=etc_apache2_sites-available_newebe.j2
76
-            dest=/etc/apache2/sites-available/newebe
77
-            group=www-data
78
-            owner=www-data
76
+            dest=/etc/apache2/sites-available/newebe.conf
77
+            group=root
78
+            owner=root
79 79
   notify: restart apache
80 80
 
81 81
 - name: Enable the site
82
-  command: a2ensite newebe
83
-           creates=/etc/apache2/sites-enabled/newebe
82
+  command: a2ensite newebe.conf
83
+           creates=/etc/apache2/sites-enabled/newebe.conf
84 84
   notify: restart apache

+ 2
- 2
roles/news/tasks/selfoss.yml Прегледај датотеку

@@ -27,11 +27,11 @@
27 27
   notify: restart apache
28 28
 
29 29
 - name: Configure the Apache HTTP server for selfoss
30
-  template: src=etc_apache2_sites-available_selfoss.j2 dest=/etc/apache2/sites-available/selfoss group=www-data owner=www-data
30
+  template: src=etc_apache2_sites-available_selfoss.j2 dest=/etc/apache2/sites-available/selfoss.conf group=root owner=root
31 31
   notify: restart apache
32 32
 
33 33
 - name: Enable the selfoss site
34
-  command: a2ensite selfoss creates=/etc/apache2/sites-enabled/selfoss
34
+  command: a2ensite selfoss.conf creates=/etc/apache2/sites-enabled/selfoss.conf
35 35
   notify: restart apache
36 36
 
37 37
 - name: Install selfoss cronjob

+ 2
- 2
roles/owncloud/tasks/owncloud.yml Прегледај датотеку

@@ -37,11 +37,11 @@
37 37
   notify: restart apache
38 38
 
39 39
 - name: Configure the Apache HTTP server for ownCloud
40
-  template: src=etc_apache2_sites-available_owncloud.j2 dest=/etc/apache2/sites-available/owncloud group=www-data owner=www-data
40
+  template: src=etc_apache2_sites-available_owncloud.j2 dest=/etc/apache2/sites-available/owncloud.conf group=root owner=root
41 41
   notify: restart apache
42 42
 
43 43
 - name: Enable the owncloud site
44
-  command: a2ensite owncloud creates=/etc/apache2/sites-enabled/owncloud
44
+  command: a2ensite owncloud.conf creates=/etc/apache2/sites-enabled/owncloud.conf
45 45
   notify: restart apache
46 46
 
47 47
 - name: Install ownCloud cronjob

+ 5
- 5
roles/readlater/tasks/wallabag.yml Прегледај датотеку

@@ -54,12 +54,12 @@
54 54
 
55 55
 - name: Configure the Apache HTTP server for wallabag
56 56
   template: src=etc_apache2_sites-available_wallabag.j2
57
-            dest=/etc/apache2/sites-available/wallabag
58
-            owner=www-data
59
-            group=www-data
57
+            dest=/etc/apache2/sites-available/wallabag.conf
58
+            owner=root
59
+            group=root
60 60
   notify: restart apache
61 61
 
62 62
 - name: Enable the wallabag site
63
-  command: a2ensite wallabag
64
-           creates=/etc/apache2/sites-enabled/wallabag
63
+  command: a2ensite wallabag.conf
64
+           creates=/etc/apache2/sites-enabled/wallabag.conf
65 65
   notify: restart apache

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