当前位置: 首页 > 图文教程 > 网络编程 > PHP > Apache服务器下配置SSI

PHP
如何批量修改RAR文件注释
XAMPP环境下mysql的root用户密码修改方法
PHP教程:最全的CURL函数库中文说明
十三个WordPress SQL查询语句
PHP技巧汇总:提高PHP性能的53个技巧
用JQuery和PHP实现无刷新删除数据库数据
PHP教程:smarty学习指南
CentOS+Nginx+PHP+MySQL环境配置
PHP 5.2.13版发布修复之前30多个BUG
PHP实例教程:PHP采集程序的思路
Apache 2.2.15版发布
PHP实例教程:汉字转为unicode的通用函数
Windows7系统安装Apache_pn服务失败
PHP实例教程:PHP开启gzip页面压缩
PHP教程:strtok()函数实际应用
FireFox插件FirePHP调试PHP
PHP 正则判断中文 UTF-8 & GBK
PHP中处理string

PHP 中的 Apache服务器下配置SSI


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 36 ::
收藏到网摘: n/a

我们需要在  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 [email protected]
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>

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

在文件末尾 添加

Include conf/extra/httpd-vhosts.conf

然后重启 Apache 就OK 啦。

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