| Author | 
  | 
mikeeblau
 
 
  Joined: 09 Feb 2006 Posts: 5
 
  | 
 Posted: Thu 09 Feb '06 20:08    Post subject: mod_cache -> mod_disk_cache | 
     | 
 
  | 
 
Steffen, great work you do! I am much impressed and deeply grateful that such peoples like you exists - thank you!
 
 
I have a problem with mod_disk_cache. I got errors like this:[Thu Feb 09 09:57:02 2006] [error] (OS 5)Zugriff verweigert  : disk_cache: rename tempfile to hdrsfile failed: c:/www_root/cache_root/aptmpyBle12 -> c:/www_root/cache_root/ns1/JhW/b38/13z/Jvc/E240G8g.header On the net I found many discussions regarding that error like that one:
 
http://www.nabble.com/-PATCH-fix-incorrect-304%27s-responses-when-cache-is-unwritable-t205089.html
 
 
I have no clue whether this patch is in the current version included or not. So I would like to ask you whether you can dig into that subject?
 
 
My httpd.conf:
 
 	  | Code: | 	 		  <IfModule mod_cache.c>
 
 
LoadModule disk_cache_module modules/mod_disk_cache.so
 
# If you want to use mod_disk_cache instead of mod_mem_cache,
 
# uncomment the line above and comment out the LoadModule line below.
 
<IfModule mod_disk_cache.c>
 
 
CacheRoot c:/www_root/cache_root
 
CacheEnable disk /
 
CacheDirLevels 5
 
CacheDirLength 3
 
 
CacheEnable disk http://www.mydomain.de/
 
 
# 3600 == (one hour)
 
CacheDefaultExpire 3600
 
 
</IfModule>
 
</IfModule>
 
 
<Directory "C:/www_root/cache_root">
 
    AllowOverride None
 
    Order allow,deny
 
    Allow from all
 
</Directory>
 
 
 | 	 
  | 
 
  | 
| Back to top | 
 | 
Steffen Moderator
 
  Joined: 15 Oct 2005 Posts: 3131 Location: Hilversum, NL, EU
  | 
 Posted: Thu 09 Feb '06 20:53    Post subject:  | 
     | 
 
  | 
 
I saw on the ASF dev list that there are fixes/changes planned for the next version of mod_cache. Do not know the patch you mention is included in the current 2.2.0.
 
 
Do you have the error all the time ?
 
 
You have a double entry in your conf:
 
 
CacheEnable disk / 
 
CacheEnable disk http://www.mydomain.de/ 
 
 
The last one you can remove if you are not acting as a forward proxy server
 
 
I just did a quick test with 2.2.0:
 
 
LoadModule cache_module modules/mod_cache.so
 
LoadModule disk_cache_module modules/mod_disk_cache.so
 
CacheRoot c:/windows/temp 
 
CacheEnable disk / 
 
CacheDirLevels 5 
 
CacheDirLength 3 
 
CacheDefaultExpire 3600
 
 
And I see no errors  so far.
 
 
 
Steffen | 
 
  | 
| Back to top | 
 | 
mikeeblau
 
 
  Joined: 09 Feb 2006 Posts: 5
 
  | 
 Posted: Thu 09 Feb '06 21:12    Post subject:  | 
     | 
 
  | 
 
 	  | Quote: | 	 		  | Do you have the error all the time ? | 	  Yes, all the time:
 
[Wed Feb 08 04:29:19 2006] [error] (OS 5)Zugriff verweigert  : disk_cache: rename tempfile to hdrsfile failed: c:/www_root/cache_root/aptmpcBQArf -> c:/www_root/cache_root/Yps/9@M/wrt/ROg/DJL/@nAtriQ.header
 
[Wed Feb 08 07:34:24 2006] [error] (OS 5)Zugriff verweigert  : disk_cache: rename tempfile to hdrsfile failed: c:/www_root/cache_root/aptmpd2a4XI -> c:/www_root/cache_root/iVF/YSR/0ya/4rZ/Kzf/4PYLcEA.header
 
[Wed Feb 08 07:38:30 2006] [error] (OS 5)Zugriff verweigert  : disk_cache: rename tempfile to hdrsfile failed: c:/www_root/cache_root/aptmpcJvfPV ->
 
...
 
...
 
 
 
 
mikeeblau | 
 
  | 
| Back to top | 
 | 
James Blond Moderator
  
  Joined: 19 Jan 2006 Posts: 7443 Location: EU, Germany, Next to Hamburg
  | 
 Posted: Fri 10 Feb '06 11:39    Post subject:  | 
     | 
 
  | 
 
| Does the server run as service? If yes, maybe the service don't have the rights to access the folder. | 
 
  | 
| Back to top | 
 | 
mikeeblau
 
 
  Joined: 09 Feb 2006 Posts: 5
 
  | 
 Posted: Fri 10 Feb '06 13:28    Post subject:  | 
     | 
 
  | 
 
Good idea ... but unfortunately it runs as "LocalSystem" service and has the rights to access the folder. Perhaps the problem stays in conjunction with the "www_root" folder. I will try to set up the "cache_root" folder separately.
 
 
mikeeblau | 
 
  | 
| Back to top | 
 | 
mikeeblau
 
 
  Joined: 09 Feb 2006 Posts: 5
 
  | 
 Posted: Fri 10 Feb '06 16:58    Post subject:  | 
     | 
 
  | 
 
YES! That was the answer! No more problems since setting up the "cache_root" folder separately.
 
 
Thanks to all for your suggestions.
 
 
mikeeblau | 
 
  | 
| Back to top | 
 | 
hydn79
 
 
  Joined: 28 Apr 2007 Posts: 19
 
  | 
 Posted: Wed 07 Jan '09 1:05    Post subject:  | 
     | 
 
  | 
 
Same problem here see error log below: 
 
 
My config:
 
 
 	  | Code: | 	 		  <IfModule cache_module>
 
LoadModule disk_cache_module modules/mod_disk_cache.so
 
# If you want to use mod_disk_cache instead of mod_mem_cache,
 
# uncomment the line above and comment out the LoadModule line below.
 
<IfModule disk_cache_module>
 
 
CacheRoot C:/WINDOWS/Temp
 
CacheEnable disk /
 
CacheDirLevels 5
 
CacheDirLength 3
 
 
# 3600 == (one hour)
 
CacheDefaultExpire 10
 
 
</IfModule>
 
</IfModule> | 	  
 
 
Error log excerpt:
 
 	  | Code: | 	 		  [Tue Jan 06 14:59:24 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to hdrsfile failed: C:/WINDOWS/Temp/aptmpA96FQr -> C:/WINDOWS/Temp/Uc1/kW9/YkS/AhJ/ECp/uxdqpfA.header
 
[Tue Jan 06 14:59:24 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to hdrsfile failed: C:/WINDOWS/Temp/aptmpCRACMp -> C:/WINDOWS/Temp/Uc1/kW9/YkS/AhJ/ECp/uxdqpfA.header
 
[Tue Jan 06 14:59:27 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to datafile failed: C:/WINDOWS/Temp/aptmpx1asW8 -> C:/WINDOWS/Temp/wyr/CRB/pzb/b7N/CaS/Lz6VSTA.data
 
[Tue Jan 06 14:59:49 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to hdrsfile failed: C:/WINDOWS/Temp/aptmpcJvfPV -> C:/WINDOWS/Temp/iHO/e9G/8XO/iv6/1iC/t2gUBwA.header
 
[Tue Jan 06 14:59:53 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to datafile failed: C:/WINDOWS/Temp/aptmprxnpay -> C:/WINDOWS/Temp/NzM/XGq/h9B/AgD/jpa/C8mAfBQ.data
 
[Tue Jan 06 14:59:53 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to hdrsfile failed: C:/WINDOWS/Temp/aptmp3xalBz -> C:/WINDOWS/Temp/wyr/CRB/pzb/b7N/CaS/Lz6VSTA.header
 
[Tue Jan 06 14:59:59 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to hdrsfile failed: C:/WINDOWS/Temp/aptmpTwYRgr -> C:/WINDOWS/Temp/Zyr/OC7/2ko/rkh/UL@/bLpaAPA.header
 
[Tue Jan 06 14:59:59 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to hdrsfile failed: C:/WINDOWS/Temp/aptmpt2szii -> C:/WINDOWS/Temp/CIf/ByH/bN9/dAy/6Ld/79j44Bw.header
 
[Tue Jan 06 14:59:59 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to hdrsfile failed: C:/WINDOWS/Temp/aptmpqSbbER -> C:/WINDOWS/Temp/kwC/C5x/7Li/hjM/lIU/y9fYxog.header
 
[Tue Jan 06 15:00:03 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to hdrsfile failed: C:/WINDOWS/Temp/aptmpcBQArf -> C:/WINDOWS/Temp/NzM/XGq/h9B/AgD/jpa/C8mAfBQ.header
 
[Tue Jan 06 15:00:11 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to datafile failed: C:/WINDOWS/Temp/aptmpY17hPB -> C:/WINDOWS/Temp/wyr/CRB/pzb/b7N/CaS/Lz6VSTA.data
 
[Tue Jan 06 15:00:12 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to datafile failed: C:/WINDOWS/Temp/aptmpTwYRgr -> C:/WINDOWS/Temp/NzM/XGq/h9B/AgD/jpa/C8mAfBQ.data
 
[Tue Jan 06 15:00:14 2009] [warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to hdrsfile failed: C:/WINDOWS/Temp/aptmpt2szii ->  | 	  
 
 
 
 
Here's my config before adding cache:
 
 
 	  | Code: | 	 		  ServerRoot "D:/www"
 
DocumentRoot "D:/www/htdocs"
 
Listen 80
 
HostnameLookups off
 
LoadModule asis_module modules/mod_asis.so
 
LoadModule auth_basic_module modules/mod_auth_basic.so
 
LoadModule authn_file_module modules/mod_authn_file.so
 
LoadModule authz_host_module modules/mod_authz_host.so
 
LoadModule authz_user_module modules/mod_authz_user.so
 
LoadModule dir_module modules/mod_dir.so
 
LoadModule never_expire_module modules/mod_never_expire.so
 
LoadModule deflate_module modules/mod_deflate.so
 
LoadModule cache_module modules/mod_cache.so
 
LoadModule disk_cache_module modules/mod_disk_cache.so
 
LoadModule headers_module modules/mod_headers.so
 
LoadModule mime_module modules/mod_mime.so
 
LoadModule negotiation_module modules/mod_negotiation.so
 
 
<IfModule !mpm_netware_module>
 
<IfModule !mpm_winnt_module>
 
User daemon
 
Group daemon
 
</IfModule>
 
</IfModule>
 
 
ServerAdmin info@xxxx.com
 
ServerName images.xxxx.com:80
 
 
<Directory "D:/www/htdocs/">
 
AddOutputFilterByType DEFLATE application/javascript text/css
 
    NeverExpire on    
 
    Options Indexes -FollowSymLinks
 
    AllowOverride None
 
    Order allow,deny
 
    Allow from all
 
</Directory>
 
 
Header unset ETag
 
FileETag None
 
 
<FilesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css)$">
 
Header unset Last-Modified
 
Header set Cache-Control "max-age=290304000, public"
 
</FilesMatch>
 
 
<IfModule dir_module>
 
    DirectoryIndex index.html
 
</IfModule>
 
 
<FilesMatch "^\.ht">
 
    Order allow,deny
 
    Deny from all
 
    Satisfy All
 
</FilesMatch>
 
 
ErrorLog "logs/error.log"
 
LogLevel warn
 
 
DefaultType text/plain
 
<IfModule mime_module>
 
    TypesConfig conf/mime.types
 
    AddType application/x-compress .Z
 
    AddType application/x-gzip .gz .tgz
 
</IfModule> | 	  
 
 
Its an image, js and css server only. | 
 
  | 
| Back to top | 
 | 
James Blond Moderator
  
  Joined: 19 Jan 2006 Posts: 7443 Location: EU, Germany, Next to Hamburg
  | 
 Posted: Wed 07 Jan '09 17:16    Post subject:  | 
     | 
 
  | 
 
Hi Hydn79,
 
you need a permission setting for the folder
 
 
 	  | Code: | 	 		  
 
<Directory "C:/WINDOWS/Temp">
 
    AllowOverride None
 
    Order allow,deny
 
    Allow from all
 
</Directory>
 
 | 	  
 
 
....
 
 
(^.^)  2000th post | 
 
  | 
| Back to top | 
 | 
hydn79
 
 
  Joined: 28 Apr 2007 Posts: 19
 
  | 
 Posted: Thu 08 Jan '09 16:18    Post subject:  | 
     | 
 
  | 
 
| still got access denied. | 
 
  | 
| Back to top | 
 |