Apache服务器下配置SSI服务-服务器

王朝数码·作者佚名  2011-05-11
宽屏版  字体: |||超大  

我们需要在 Apache/conf/extra/ 目录下建立一个 httpd-vhosts.conf 这样的文件。

文件内容如下:

# ../vhosts 是你的网站目录

Options -Indexes FollowSymLinks

AllowOverride All

Order allow,deny

Allow from all

Directory

NameVirtualHost *

DocumentRoot ../vhosts

ServerName defalut:80

ErrorLog logs/defalut-error_log

VirtualHost

#因为有可能你有多个站点,针对每个站点在vhosts下建立不同的目录 比如 c:/vhosts/javapeixun

Allow from all

Directory

#这段是用来配置域名的哦。

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 的。

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

编辑 Apache\conf 目录下 的 httpd.conf。

在文件末尾 添加

Include conf/extra/httpd-vhosts.conf

然后重启 Apache 就OK 啦。

Apache 就是这样配置 SSI 和 域名的。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有