virtualhost.conf
1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
DocumentRoot "/usr/share/noosfero/public"
<Directory "/var/lib/noosfero/current/public">
Options FollowSymLinks -Indexes
AllowOverride None
Order Allow,Deny
Allow from all
</Directory>
RewriteEngine On
# Rewrite index to check for static index.html
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^.*$ balancer://noosfero%{REQUEST_URI} [P,QSA,L]
ErrorDocument 503 /503.html
ErrorLog /var/log/apache2/noosfero.log
LogLevel warn
CustomLog /var/log/apache2/noosfero.access.log vhost_combined
# Compress outgoing text content
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript
# Add Expires: header
ExpiresActive On
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
# vim: ft=apache