摘要: 阅读全文
posted @ 2015-11-17 23:55 沐风先生 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 这里的静态文件主要是图片、js、css等,这些文件被客户端的浏览器缓存到本地电脑上,这里要做的是设置它的过期时间 apachectl -M 若没有,则 在Apache的httpd.conf文件中进行如下配置: #启用expires_module模块 LoadModule expires_module 阅读全文
posted @ 2015-11-17 17:25 沐风先生 阅读(245) 评论(0) 推荐(0) 编辑
摘要: vim /usr/local/apache2/conf/extra/httpd-vhosts.conf 添加 SetEnvIf Request_URI ".*\.gif$" image-request SetEnvIf Request_URI ".*\.jpg$" image-request Set 阅读全文
posted @ 2015-11-17 17:19 沐风先生 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 目的:为了让浏览器分清哪个是主域名 apachectl -M(查看所需模块是否加载) 在对应的虚拟主机里添加 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^www.wulei.com$ RewriteRule 阅读全文
posted @ 2015-11-17 16:42 沐风先生 阅读(180) 评论(0) 推荐(0) 编辑