virtualhost.conf 1.14 KB
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