我正在使用drupal 7 boost模块生成html缓存。我正在使用负载均衡器服务器,html缓存文件位于节点1,节点2和节点3中。
如果此缓存文件夹具有775权限,所有者为“root”,Group为“root”,则在用户访问页面时,drupal日志中存在权限问题The file permissions could not be set on cache/normal/IP_ADDRESS/PATH_TO_FILE/NAME_OF_THE_FILE.html
(&缓存文件无法重新生成)
如果此缓存文件夹具有775权限,所有者为apache
,而群组为apache
,则在用户访问权限页面时,没有权限问题。但是,当用户访问页面时,缓存会重新生成。
是否由于服务器权限而发生此问题?或者由于drupal boost配置。
以下是.htacces提升设置。
### 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 ###
答案 0 :(得分:0)
以下是一些猜测,因为你没有留下太多信息: