Apache服务器下配置SSI服务
来源:网络时间:2023-12-26 00:12:21
我们需要在
Apache/conf/extra/ 目录下建立一个 httpd-v
hosts.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@
DocumentRoot c:/vhosts/javapeixun
ServerName :80
ServerAlias www.
ErrorLog logs/-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 和 域名的。 本文内容为用户投稿,该文观点仅代表作者本人,不代表本站立场,本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请将相关资料发送至
[email protected]进行
反馈与投诉,一经查实,立即处理!