nginx+apache , proxypass模式,静态的cache control还是要放在apache这里:
1. 编辑配置文件
vim /etc/apache2/mods-available/expires.conf
<IfModule mod_expires.c> ExpiresActive On <filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> ExpiresDefault "access plus 3 days" </filesMatch> </IfModule>
2. 连接到mods-enabled
cd /etc/apache2/mods-enabled/ ln -s ../mods-available/expires.conf expires.conf ln -s ../mods-available/expires.load expires.load
3.重启后观察
/etc/init.d/apache2 restart
相关推荐
[ 3.968638] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 3.968734] [mmc]: mclk 0xf1c20090 0xc100000b [ 3.989421] Bluetooth: BNEP filters: protocol ...
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明http://www.chedong.com/tech/apache_install.html关键词: apache install php resin mod_gzip mod_expire webalizer ...
**2. Apache安装参数** - **源码下载地址:** `http://archive.apache.org/dist/httpd/httpd-2.2.14.tar.gz` - **解读:** 指定了Apache版本为2.2.14,并提供了官方下载链接。 - **编译参数说明:** - `--prefix=/...
来到Subversion的安装目录(通常是c:\program files\Subversion),找到文件/httpd/mod_dav_svn.so和mod_authz_svn.so,复制这些文件到Apache的模块目录(通常是c:\program files\apache group\apache2\modules )。...
[ 3.968638] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 3.968734] [mmc]: mclk 0xf1c20090 0xc100000b [ 3.989421] Bluetooth: BNEP filters: protocol ...
[ 3.968638] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 3.968734] [mmc]: mclk 0xf1c20090 0xc100000b [ 3.989421] Bluetooth: BNEP filters: protocol ...
2. The PHPRC environment variable. (As of PHP 5.2.0) ; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) ; 4. Current working directory (except CLI) ; 5. The web server's directory...
在Apache服务器上,可以通过mod_expires模块在httpd.conf或.htaccess文件中配置ExpiresDefault指令,为不同类型的文件设置不同的过期时间,如设置图片、HTML文件等长期缓存。 2. Cache-Control Cache-Control提供了...