Przeglądaj źródła

Merge pull request #112 from brucespang/owncloud-speed

OwnCloud speed
Alex Payne 11 lat temu
rodzic
commit
6b0a28e7db

+ 9
- 2
roles/owncloud/tasks/owncloud.yml Wyświetl plik

@@ -15,7 +15,10 @@
15 15
   apt_repository: repo='deb http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/ /'
16 16
 
17 17
 - name: Install ownCloud from OpenSuSE repository
18
-  apt: pkg=owncloud update_cache=yes
18
+  apt: pkg=owncloud
19
+
20
+- name: Install PHP-APC
21
+  apt: pkg=php-apc
19 22
 
20 23
 - name: Store ownCloud data securely
21 24
   command: mv /var/www/owncloud/data /decrypted/owncloud-data creates=/decrypted/owncloud-data
@@ -29,8 +32,13 @@
29 32
   command: a2enmod headers creates=/etc/apache2/mods-enabled/headers.load
30 33
   notify: restart apache
31 34
 
35
+- name: Enable Apache expires module
36
+  command: a2enmod expires creates=/etc/apache2/mods-enabled/expires.load
37
+  notify: restart apache
38
+
32 39
 - name: Configure the Apache HTTP server for ownCloud
33 40
   template: src=etc_apache2_sites-available_owncloud.j2 dest=/etc/apache2/sites-available/owncloud group=www-data owner=www-data
41
+  notify: restart apache
34 42
 
35 43
 - name: Enable the owncloud site
36 44
   command: a2ensite owncloud creates=/etc/apache2/sites-enabled/owncloud
@@ -38,4 +46,3 @@
38 46
 
39 47
 - name: Install ownCloud cronjob
40 48
   cron: name="ownCloud" user="www-data" minute="*/5" job="php -f /var/www/owncloud/cron.php > /dev/null"
41
-

+ 17
- 0
roles/owncloud/templates/etc_apache2_sites-available_owncloud.j2 Wyświetl plik

@@ -22,9 +22,26 @@
22 22
     ErrorLog                /var/log/apache2/owncloud.info-error_log
23 23
     CustomLog               /var/log/apache2/owncloud.info-access_log common
24 24
 
25
+    php_value session_cache_limiter "public"
26
+
25 27
     <Directory /var/www/owncloud>
26 28
         AllowOverride All
27 29
         Order allow,deny
28 30
         allow from all
31
+        DirectoryIndex index.php
32
+
33
+        SetOutputFilter DEFLATE
34
+
35
+        ExpiresActive On
36
+        ExpiresDefault "access plus 2 weeks"
37
+        ExpiresByType text/css "access plus 2 weeks"
38
+        ExpiresByType image/svg+xml "access plus 2 weeks"
39
+        ExpiresByType image/png "access plus 2 weeks"
40
+        ExpiresByType text/javascript "access plus 2 weeks"
41
+        ExpiresByType application/x-javascript "access plus 2 weeks"
42
+        ExpiresByType application/javascript "access plus 2 weeks"
43
+        ExpiresByType application/x-icon "access plus 2 weeks"
44
+
45
+        Header set Cache-Control "public"
29 46
     </Directory>
30 47
 </VirtualHost>

Ładowanie…
Anuluj
Zapisz