diff options
author | Milo Casagramde <milo.casagrande@linaro.org> | 2013-02-27 11:22:48 +0000 |
---|---|---|
committer | Milo Casagramde <milo.casagrande@linaro.org> | 2013-02-27 11:22:48 +0000 |
commit | 2bb2da933f9e36491114fcccaf614d041343984d (patch) | |
tree | 64aeb7ed7b8237588a81f90406c5c6cf1ce1f971 | |
parent | 0f93492d1ea35b2fe8c5d17f4271178801988a80 (diff) |
Disable RhodeCode static files, server them via Apache, enabled expire header.
-rw-r--r-- | config/development.ini | 2 | ||||
-rw-r--r-- | config/production.ini | 2 | ||||
-rw-r--r-- | config/rhodecode | 33 |
3 files changed, 35 insertions, 2 deletions
diff --git a/config/development.ini b/config/development.ini index 788d214..0b2841e 100644 --- a/config/development.ini +++ b/config/development.ini @@ -25,7 +25,7 @@ prefix = /<your-prefix> use = egg:rhodecode #filter-with = proxy-prefix full_stack = true -static_files = true +static_files = false lang = en cache_dir = %(here)s/data index_dir = %(here)s/data/index diff --git a/config/production.ini b/config/production.ini index a00e5e2..ea6aa39 100644 --- a/config/production.ini +++ b/config/production.ini @@ -41,7 +41,7 @@ prefix = /<your-prefix> use = egg:rhodecode #filter-with = proxy-prefix full_stack = true -static_files = true +static_files = false lang = en cache_dir = /opt/rhodecode/data index_dir = /opt/rhodecode/data/index diff --git a/config/rhodecode b/config/rhodecode index 723ac6a..5f45d17 100644 --- a/config/rhodecode +++ b/config/rhodecode @@ -1,3 +1,36 @@ +SetEnv GIT_PROJECT_ROOT /opt/rhodecode/git_repos/ +SetEnv HTTP_GIT_EXPORT_ALL + +AliasMatch ^/images/(.*)$ /home/rhodecode/rhodecode/rhodecode/public/images/$1 +AliasMatch ^/css/(.*)$ /home/rhodecode/rhodecode/rhodecode/public/css/$1 +AliasMatch ^/js/(.*)$ /home/rhodecode/rhodecode/rhodecode/public/js/$1 + +<Location /images > + ProxyPass ! +</Location> + +<Location /css > + ProxyPass ! +</Location> + +<Location /js > + ProxyPass ! +</Location> + +ExpiresActive on +ExpiresDefault "access plus 300 seconds" + +ExpiresByType text/css "access plus 1 day" +ExpiresByType text/javascript "access plus 1 day" +ExpiresByType image/png "access plus 1 month" +ExpiresByType image/jpg "access plus 1 month" +ExpiresByType image/jpeg "access plus 1 month" +ExpiresByType image/x-icon "access plus 1 month" + +<IfModule mod_headers.c> + Header append Cache-Control "public, no-transform" +</IfModule> + <VirtualHost *:80> ServerName XXXX ServerAlias XXXX |