我在我的Ubuntu服务器上使用Openpanel(完全更新/升级昨晚),我有一个小问题,我敢肯定不是所有的configuration文件都包含在内,因此导致问题不redirect,不加载我的caching控制标题。
这看起来不太合适(这是它用来包含我的其他configuration的正则expression式)
Include /etc/apache2/openpanel.d//davemackintosh.co.uk.inc/[^.#]*
而我的davemackintosh.co.uk.inc文件正在通过Apacheconfigurationtesting,我只是不认为他们被列入。
caching.conf proxy.conf <-- This is definitely included otherwise my site wouldn't be up redirects.conf
除非我的configuration不正确,所以在这里他们是:
#Disable Last-Modified Response Header <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|html|rpc)$"> Header unset Last-Modified </FilesMatch> #Default Cache-control header for most static files <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "max-age=7200, public" </FilesMatch> # Revalidate For No-cache files each time <FilesMatch "\.nocache\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "max-age=0, no-cache, must-revalidate" </FilesMatch> # Revalidate html/rpc files each time <FilesMatch "\.(html|rpc)$"> Header set Cache-Control "max-age=0, no-cache, must-revalidate" </FilesMatch> # Cache "forever" due to files are given a unique name every time they are built <FilesMatch "\.cache\.(html|js|png|gif)$"> Header set Cache-Control "max-age=2592000, public" </FilesMatch>
Redirect ^[0-9]{4}/[0-9]{2}/(.*)/?$ /blog/$1
ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> <Location /> ProxyPass http://localhost:4089/ ProxyPassReverse http://localhost:4089/ </Location>
有没有办法列出当前加载的configuration文件?
假设你已经加载了mod_headers(你可以通过执行apachectl -t -D DUMP_MODULES来检查)。
我注意到响应标题上的其他内容。
CF-Cache-Status:MISS Server:cloudflare-nginx
所以虽然,
是的,如果您的原始服务器返回它们,CloudFlare将会遵守Expires和Cache-Control标头
你确定你已经在cloudflare中正确的configuration了吗?
**编辑:我刚才注意到你的configuration另一件事是,你正在试图匹配FileMatch不。 所以你的规则不匹配。 如果你想实现这个,你必须创build一个<directory /your_dir> <filematch ..>或者一个.htaccess 。
**编辑2:如果我可以正确读取redirect,它匹配一个4位数字/ 2位数字。 一切都是一个angular色,之后的一切。我不能告诉你想要它匹配什么。
要回答标题/usr/sbin/httpd -V或apache2ctl -V应该显示加载的conf。 如果Include指令中的某些内容不起作用,那么日志中应该有一个错误。