我正在尝试向 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,并希望在访问域时看到“它可以工作”,但 Chrome 显示的是“ERR_NAME_NOT_RESOLVED”
我在这里缺少哪些步骤? (我习惯在windows环境下工作,这是我第一次真正接触CentOS)
最佳答案
将此作为 DNS 问题解决,解决了本地编辑主机以匹配 IP。
关于apache - CentOS5 上的虚拟主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34120041/