static cache - makestaticcaching.php doesn't create anything

Author Message

Erik Streb

Saturday 16 July 2005 6:01:28 am

Hello.

I used this manual ( http://ez.no/ez_publish/download/changelogs/ez_publish_3_6/new_features/static_caching_of_content ) to activate static caching.

I have two languages (en, de).
When I execute this command

php bin/php/makestaticcache.php -f

or this

php bin/php/makestaticcache.php -s de

nothing happens in the static/de and static/en directories. They stay empty.

My configuration files look like this:
I added

[ContentSettings]
StaticCache=enabled

to /home/DOMAIN/ezpublish/settings/override/site.ini.append.php

/home/DOMAIN/ezpublish/settings/override/staticcache.ini.append.php

<?php /* #?ini charset="iso-8859-1"?

[CacheSettings]
HostName=localhost
MaxCacheDepth=4

# A list of url's to cache
CachedURLArray[]
CachedURLArray[]=/*
#CachedURLArray[]=/news*
#CachedURLArray[]=/products*

CachedSiteAccesses[]
CachedSiteAccesses[]=de
CachedSiteAccesses[]=en
*/ ?>

For every siteaccess (example en) this:
/home/DOMAIN/ezpublish/settings/siteaccess/en/staticcache.ini.append.php

<?php /* #?ini charset="iso-8859-1"?

[CacheSettings]
StaticStorageDir=static/en
*/ ?>

And finally this is my /etc/apache2/vhosts.d/DOMAIN.com.conf

<VirtualHost {IP}:80>
  ServerName www.DOMAIN.de
  ServerAlias www.DOMAIN2.com
  DocumentRoot /home/DOMAIN/ezpublish
  ScriptAlias /cgi-bin/ /home/DOMAIN/cgi-bin/
  php_admin_value open_basedir /home/DOMAIN/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir /home/DOMAIN/phptmp/

RewriteEngine On
RewriteRule !(^/Software|^/share|^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf|exe|txt|zip)$ /index.php


# Anfang von Static Caching für eZpublish ---
#RewriteLog    /tmp/rewrite.log
RewriteLogLevel 4

RewriteCond   /home/DOMAIN/ezpublish/static/de/index.html -f
RewriteRule  ^/$              /static/de/index.html [L]
RewriteCond   /home/DOMAIN/ezpublish/static/de/index.html -f
RewriteRule  ^$               /static/de/index.html [L]

RewriteCond   /home/DOMAIN/ezpublish/static/en/index.html -f
RewriteRule  ^/$              /static/en/index.html [L]
RewriteCond   /home/DOMAIN/ezpublish/static/en/index.html -f
RewriteRule  ^$               /static/en/index.html [L]

RewriteCond   %{REQUEST_METHOD}       !^POST$
RewriteCond   /home/DOMAIN/ezpublish/static$1/index.html -f
RewriteRule   ^(.*)$  /static$1/index.html [L]

RewriteRule !\.(gif|css|jpg|png|jar|ico|js)$ /index.php
# Ende von Static Caching für eZpublish ---
</VirtualHost>

And of course I created the directories /home/DOMAIN/ezpublish/static/de and /home/DOMAIN/ezpublish/static/en

What could be the problem?

Łukasz Serwatka

Sunday 17 July 2005 2:19:09 am

Try this steps:

1. Remove staticcache.ini.append.php for siteaccesses
2. Add in to override staticcache.ini.append.php file

[CacheSettings]
StaticStorageDir=static

3. Try again

eZ publish should create static cache for every siteaccess in folders

static/en <-siteaccess name
static/de <-siteaccess name

And make sure that you using eZ pub version from SVN.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.