apache学习笔记(不断更新)

win下:用putty.exe英文版

linux下:用命令:

ssh -l username -p xxx hostname
其中xxx表示端口(port), username是用户名


【httpd.conf】学习:
1.设置默认最先打开的页面:在httpd.conf里DirectoryIndex index.html这里增加index.php就可以支持默认index.php了
2.修改Error404的默认页面:(这个叫本地重定向)
(1)sudo vim /etc/httpd/conf/httpd.conf
(2)/missing.html(查找)
(3)去掉注释:ErrorDocument 404 /missing.html  missing.html修改为你想要的名字,比如404.html
(4)/DocumentRoot 我的是/var/www/html  然后在这个路径下vim 404.html
(5)service httpd restart 重启apache,原来的404页面变成了你的页面!
win下的httpd.conf的一个参考:http://www.cnblogs.com/sunky/articles/1409267.html
查看了下自己/etc/httpd/conf/httpd.conf  虽然是英文的但是大部分能看懂的
posted @ 2013-03-11 22:17  ChrisZZ  阅读(189)  评论(0编辑  收藏  举报