首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >每次Drupal boost缓存覆盖

问每次Drupal boost缓存覆盖
EN

Stack Overflow用户
提问于 2014-02-27 22:03:44
回答 1查看 442关注 0票数 1

我正在使用Drupal7Boost模块生成html缓存。我使用的是负载均衡器服务器,html缓存文件在节点1、节点2和节点3。如果此缓存文件夹拥有775权限,并且所有者为“根”,组为“根”,则当用户访问页面时,在The file permissions could not be set on cache/normal/IP_ADDRESS/PATH_TO_FILE/NAME_OF_THE_FILE.html日志中存在权限问题(缓存文件不会重新生成)

如果该缓存文件夹拥有775权限,且owner为apache,Group为apache,则当用户访问页面时,不存在权限问题。但每次用户访问页面时,缓存都会重新生成。

这个问题是不是服务器权限的问题?或者由于drupal boost配置。

以下是.htacces boost设置。

代码语言:javascript
复制
### BOOST START ###

# Allow for alt paths to be set via htaccess rules; allows for cached variants (future mobile support)
RewriteRule .* - [E=boostpath:normal]

# Caching for anonymous users
# Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR]
RewriteCond %{REQUEST_URI} (^/vc/vacanze-in-montagna/(admin|cache|misc|modules|sites|system|openid|themes|node/add|comment/reply))|(/(edit|user|user/(login|password|    register))$) [OR]
RewriteCond %{HTTPS} on [OR]
RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [S=3]

# GZIP
RewriteCond %{HTTP:Accept-encoding} !gzip
RewriteRule .* - [S=1]
RewriteCond %{DOCUMENT_ROOT}/vc/vacanze-in-montagna/cache/%{ENV:boostpath}/LOAD_BALANCER_IP%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
RewriteRule .* cache/%{ENV:boostpath}/LOAD_BALANCER_IP%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html,E=no-gzip:1]

# NORMAL
RewriteCond %{DOCUMENT_ROOT}/vc/vacanze-in-montagna/cache/%{ENV:boostpath}/LOAD_BALANCER_IP%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteRule .* cache/%{ENV:boostpath}/LOAD_BALANCER_IP%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]

### BOOST END ###
EN

回答 1

Stack Overflow用户

发布于 2014-04-16 01:51:44

这里是一些猜测,因为你没有留下太多的信息:

  1. 您的the服务器用户没有被称为"apache“或组错误?
  2. 您忘记启用mod_rewrite了吗?或者忘记了allow AllowOverride for your .htaccess?
  3. 你弄乱了.htaccess文件并将boost设置粘贴到了错误的位置?(发生在我身上一次...)
  4. 你以某种方式将Drupal子路径安装在像/var/www/mysite/ subpath /这样的子路径中,但却将url指向"mysite“路径?(我猜这可能会打乱重写规则)
  5. 您有没有尝试将该目录添加为"apache"-user?比如: runuser -l apache -c 'mkdir /你的/ drupal/dir/newdir'?->如果这不起作用,你就知道这是权限问题。
  6. 我已经没有办法了……
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22070867

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档