在修改Apache的配置文件时,由于某些非正常操作,导致httpd.conf文件非正常打开,需要继续enter进入, 这是会在httpd.conf同级目录中产生一个隐藏文件,.httpd.conf.swp.这个文件是隐藏的,需要使用 list -a 才能看到, 这个文件需要删除,再重启Apache(service httpd restart)才能正常启动Apache.这时刷新网页就可以打开了.
apache 的httpd.conf常用配置说明 # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be