Apache服务器下配置SSI

来源:asp之家 时间:2009-10-11 12:21:00 

我们需要在 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 和 域名的。

标签:Apache,ssi
0
投稿

猜你喜欢

  • 决战web2.0时代 13种常用的网络营销策略

    2009-02-17 09:49:00
  • 忽悠人的“长尾”理论

    2007-09-20 22:18:00
  • 在Linux系统下配置WU-FTP服务器

    2008-09-26 17:24:00
  • Discuz! NT新版本提前探秘 四大功能即将惊艳亮相

    2009-08-27 09:36:00
  • 网站如何将用户体验与搜索引擎优化相结合

    2008-12-03 10:12:00
  • Windows 2000 Server 系统安装后的简单安全配置

    2009-08-09 13:52:00
  • Microsoft Windows 2003集群攻略

    2008-12-22 16:32:00
  • GooDaddy主机-如何设置POP邮件 Godaddy

    2010-04-23 12:31:00
  • phpwindV6.3关于改名后可以重复投票问题

    2009-02-20 16:03:00
  • 中国10大站长论坛排行榜

    2008-03-11 18:02:00
  • ASP漏洞分析和解决方法

    2008-10-30 13:35:00
  • 去掉OBlog页面底部版权信息及图片的方法

    2009-07-05 18:36:00
  • 我做盈利网站全过程

    2010-03-07 14:24:00
  • 2009年淘宝不再是以前的淘宝

    2009-10-14 12:52:00
  • 博客系统的安全设置技巧

    2007-09-23 15:41:00
  • Win 2003中为SMTP服务配置本地域

    2007-08-20 15:18:00
  • 站内结构对于英文站优化很重要

    2009-07-07 16:34:00
  • 谷歌关于网站重复内容的10个建议

    2008-01-23 14:34:00
  • 什么是真正的双线主机

    2009-09-20 20:35:00
  • WordPress基础SEO详细指南

    2011-04-26 19:48:00
  • asp之家 网站运营 m.aspxhome.com