我現在被緩存搞到快瘋了!
我是在ubuntu 16.04架設網站
然後有用多個站點功能
也啟用了https (用certbot)
站A會到 var/www/html
站B會到 var/www/re
在多個站點設定裡面
000-default.conf是預設的我沒有動它,他是站A的
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =aaa.xxx.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
站B 我取名 xxx-com.conf
ServerName www.xxx.com
DocumentRoot /var/www/re
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.xxx.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
我想讓所有的cache都取消掉
但是我不知道要放在哪?
我只知道etc/apache2.conf 我有放
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
這是讓 .htaccess 啟用的參數(應該放這沒錯吧?至少可以跑)
我現在超級亂的
我網上查的不要cache代碼
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalida$
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
CacheDisable on
放哪都不對啊一點效也沒有!
更別說在php header/ meta header放no-cache
根本沒有用
然後我的站點很怪
用https瀏覽,當我更新網頁的時候能即時更新(重新整理就可換新)
但當我用http瀏覽,卻死都見不到新的變更!
__
我想讓網頁不要有任何cache