index.html CentOS 6的位置

基于这个http://www.servermom.com/how-to-add-new-site-into-your-apache-based-centos-server/454/教程安装了基于Apache的CentOS服务器

我使用putty.exe作为编辑器

vi /etc/httpd/conf/httpd.conf在最下面修改为

 <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/fikitipis.com/public_html ServerName www.fikitipis.com ServerAlias fikitipis.com ErrorLog /var/www/fikitipis.com/error.log CustomLog /var/www/fikitipis.com/requests.log common </VirtualHost> 

所以期望这个索引是在/var/www/fikitipis.com/public_html

当在浏览器中input服务器的IP地址时,请参阅Apache 2 Test Page powered by CentOS等。 You may now add content to the directory /var/www/html/

然后

 [root@vps ~]# ls /var/www/ 

看到

 cgi-bin domain.com error fikitipis.com html icons 

检查目录的内容

ls /var/www/domain.com/public_html ls /var/www/fikitipis.com/public_html /var/www/html/为空

index.html在哪里?

touch /var/www/fikitipis.com/public_html/index1.html然后vi /var/www/fikitipis.com/public_html/index1.html ,inputa ,然后在文件中写一些文本,然后Escape和shift+zz 。 并在浏览器http://111.111.11.111/index1.html ,看看我写了什么。 所以直到现在看来,所有的作品

您看到的ErrorDocument(请参阅John的文章)是默认安装在CentOS / RHEL中的一种特殊configuration。 如果要禁用它,请清空/etc/httpd/conf.d/welcome.conf的内容。 (不要删除这个文件,因为下次你升级httpd软件包的时候RPM就会把它放回去。)

“Apache 2testing页面”是错误文档。 这不是一个实际的页面。