CentOS5上的虚拟主机

时间:2015-12-06 16:50:48

标签: apache centos

我正在尝试将新的虚拟主机添加到CentOS 5盒中。

我在virtualhost.conf中添加了一个匹配现有条目的新部分:

<VirtualHost ip address:80>
    ServerAdmin email@email.com
    DocumentRoot /home/stuff/public_html
    ServerName stuff.stuff.com
    ErrorLog /var/log/httpd/stuff.stuff.com-error_log
    CustomLog /var/log/httpd/stuff.stuff.com-access_log combined
    <Directory /home/stuff/public_html>
        Options All
        AllowOverride All
    </Directory>
    <IfModule mpm_itk_module>
      AssignUserId stuff stuff
    </IfModule>
</VirtualHost>

然后我使用以下命令重新加载:/etc/init.d/httpd reload

我已经在目录中放置了占位符index.php,并希望看到&#34;它可以正常工作&#34;访问域名时,Chrome会显示&#34; ERR_NAME_NOT_RESOLVED&#34;

我在这里缺少哪些步骤? (我以前在Windows环境下工作,这是我第一次真正遇到CentOS)

1 个答案:

答案 0 :(得分:0)

将此解决为DNS问题,已解决本地编辑主机以匹配IP。