14 07年5月

apache tips

关键字:
贝贝爸 发表在 技术文章 |

apache如何多个域名指向一个site?
用ServerAlias

<VirtualHost www.juyimeng.com>
ServerName www.juyimeng.com
ServerAdmin juhui@test.com
ServerAlias www.abc.com
ServerAlias www.def.com
DocumentRoot /usr/juhui/htdocs/
ErrorLog logs/juyimenng.error_log
</VirtualHost>

如何不用.htaccess这个文件名字?

AccessFileName .config
如何让.htaccess文件起作用?
如果.htaccess文件不起作用,请检查apache的配置文件里面的
AllowOverride 设置
简单的用
AllowOverride All
最少要是
AllowOverride FileInfo

通过在客户端缓存css.js,图片等文件来加速网站浏览速度

ExpiresActive On
ExpiresByType image/gif A259200
ExpiresByType image/png A259200
ExpiresByType image/jpg A259200
ExpiresByType image/jpeg A259200
ExpiresByType text/css A259200
ExpiresByType   application/x-javascript A259200

259200是3天的秒数,A的意思是从最后一个访问开始,缓存三天。

推荐一个apache+mysql+php+java等的安装文件包http://www.apachefriends.org/
方便得很,直接集成多种服务,包括
Apache、MySQL、PHP + PEAR、Perl、mod_php、mod_perl、mod_ssl、OpenSSL、phpMyAdmin、Webalizer、Mercury Mail Transport System for Win32 and NetWare Systems v3.32、JpGraph、FileZilla FTP Server、mcrypt、eAccelerator、SQLite 和 WEB-DAV + mod_auth_mysql
等,你要用的有,想到的有,没想到的也有好,测试,本地开发环境使用,谁用谁知道阿。

“apache tips”1个评论

请添加你的评论!您的观点很重要,来吧,让贝贝知道你想的是啥。

  1. 1 On 2007年5月15 0:10, 如何做301转向 » 百变贝贝说:

    […] 也可以用apache的.htaccess,怎么使.htaccess起效,点这里 .htaccess文件的内容 RewriteEngine onrewriterule abc.html /index.html [R=301] […]

发表评论

美体小铺急救棒 the bodyshop body shop 美体小铺茶树精油 美体小铺接骨木花眼胶 美体小铺VE眼霜
美体小铺急救棒 the bodyshop body shop 美体小铺茶树精油 美体小铺接骨木花眼胶 美体小铺VE眼霜