栏目导航
热点推荐
- Windows Xp下配置IIS的简单教程
- XP配置IIS+ASP详解(新手调试ASP
- Window2003配置ASP程序2个常见问
- 收集IIS配置错误-- 您未被授权查
- windows 2000服务器IIS开启父路
- IIS无法启动错误的几种解决方法
- 保护好IIS Web服务器的15个技巧
- nginx缓存功能cache的教程
- 服务器数据备份寻找适合自己的最
- WEB专用服务器的安全设置的实战
- 一个IP建多个Web站点主机头办法
- 和服务器相关的几个名词术语
阅览排行
Apache服务器下配置SSI
www.jz123.cn 2009-10-09 来源: 中国建站 责任编辑(袁袁) 我要投递新闻
我们需要在 Apache/conf/extra/ 目录下建立一个 httpd-vhosts.conf 这样的文件。
文件内容如下:
# ../vhosts 是你的网站目录
<Directory "../vhosts">
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Directory>
NameVirtualHost *
<VirtualHost *>
DocumentRoot ../vhosts
ServerName defalut:80
ErrorLog logs/defalut-error_log
VirtualHost>
#因为有可能你有多个站点,针对每个站点在vhosts下建立不同的目录 比如 c:/vhosts/javapeixun
<Directory "c:/vhosts/javapeixun">
Allow from all
Directory>
#这段是用来配置域名的哦。
<VirtualHost *>
ServerAdmin admin@javapeixun.com.cn
DocumentRoot c:/vhosts/javapeixun
ServerName javapeixun.com.cn:80
ServerAlias www.javapeixun.com.cn
ErrorLog logs/javapeixun.com.cn-error_log
VirtualHost>
#这里就是用来配置 SSI 的。
<Directory "c:/vhosts/">
AddOutputFilterByType INCLUDES;DEFLATE text/html
AddType text/html .html .htm .shtml .ssi
AddHandler server-parsed .shtml .html .htm .shtm
# AddHandler cgi-script cgi
Options Indexes MultiViews Includes
AllowOverride None
Order allow,deny
Allow from all
Directory>
编辑 Apacheconf 目录下 的 httpd.conf。
在文件末尾 添加
Include conf/extra/httpd-vhosts.conf
然后重启 Apache 就OK 啦。
Apache 就是这样配置 SSI 和 域名的。
上一篇:保护好IIS Web服务器的15个技巧 下一篇:伪静态在iis下的规则和设置方法