1
我使用drupal 7 boost模塊生成html緩存。我正在使用負載平衡器服務器,並且html緩存文件位於節點1,節點2和節點3中。 如果此緩存文件夾具有775權限,且擁有者爲「root」,組爲「root」,則當用戶訪問頁面時在Drupal的日誌的權限問題,因爲The file permissions could not be set on cache/normal/IP_ADDRESS/PATH_TO_FILE/NAME_OF_THE_FILE.html
(&緩存文件不是再生)Drupal boost緩存每次覆蓋
如果高速緩存文件夾具有所有者apache
和集團apache
775權限,當用戶訪問頁面,沒有權限問題。但是,當用戶訪問頁面時,緩存會重新生成。
此問題是否由於服務器權限而發生?或者由於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 ###
您是否曾經找到過解決方案?我有類似的問題。 – Hawkee
也有興趣聽到這個解決方案 - 只有主頁有相同的問題。 – freethebees