您好,欢迎来到化拓教育网。
搜索
您的当前位置:首页apache 2配置

apache 2配置

来源:化拓教育网

sudo gedit /etc/apache2/sites-enabled/000-default

修改完了 别忘记重启apache2服务器

命令: sudo /etc/init.d/apache2 restart
2、修改默认主页
修改默认主页:一般在 sudo gedit /etc/apache2/apache2.conf里面
找到 DirectoryIndex 在后面添加 如index.php等
不过随apache2的版本不同 文件的放置位置不一样 我在ubuntu8.10下面配置文件就不一样。
别怕 输入这个命令 grep -iR DirectoryIndex /etc/apache2
查看 DirectoryIndex 在apache2那个文件里面。
我的就是 这样的
/etc/apache2/mods-enabled/dir.conf:          DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
/etc/apache2/mods-available/dir.conf:          DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
为什么所2个文件都有呢。我也不清楚 不过我在群里 有高手说了 其实2个文件关系是上面那个是下面那个的符号链接,还是一样的。随便添加默认文档就可以了

转载于:https://www.cnblogs.com/WingPig/archive/2013/01/27/2878520.html

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo9.cn 版权所有 赣ICP备2023008801号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务