APACHE常用设置实例 1.设置默认文档: DirectoryIndex [文档名] 例: DirectoryIndex index.php index.jsp index.htm index.html index.html.var 打开网站时默认打开index.php,index.jsp,index.htm,index.html,index.html.var文件. 2.配置APACHE服务的端口: Listen [端口号] (注意不要与其他服务产生冲突) 例: Listen 8080 3.设置默认网站路径: DocumentRoot [路径] 例: DocumentRoot "D:/httpd/server/apache/Apache2/htdocs"
4.解决PHP在apache服务中的乱码问题: 4.1.解决方法一: [推荐] 打开apache的配置文件httpd.conf 把 AddDefaultCharset ISO-8859-1 替换成 #AddDefaultCharset ISO-8859-1 或者 AddDefaultCharset Off 重启动apache 清空浏览器的缓存 4.2.解决方法二: AddDefaultCharset GB2312 DefaultLanguage GB2312 AddLanguage zh-cn .cn 4.3.解决方法三: AddDefaultCharset gb2312 5.创建虚拟子目录: Alias /icons/ "D:/httpd/server/apache/Apache2/icons/" #创建子目录
<Directory "D:/httpd/server/apache/Apache2/icons"> #子目录设置 Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> |
分享 |
评论 (
0) |
阅读 (
?) |
固定链接 |
类别 (
WEB开发技术) |
发表于 07:44 | 最后修改于 2006-07-02 07:44
评论
想第一时间抢沙发么?