在虚拟机上使用 Windows DNS 和 Apache 设置网页
我继承了一个要维护的网站,该网站托管在 Fedora/Apache 的虚拟机上。该网站的 DNS 是在 Windows 2000 Server 计算机上维护的。
当前设置没有测试站点来在部署之前测试更改。我已将 Fedora 上网站的内容(位于 /pub/customercenter.perceptionistinc.com)复制到新目录 /pub/customercenterstaging.perceptionistinc.com。
我将这个新临时站点的 DNS 添加到了 Windows 服务器,指向与实时站点相同的 IP 地址 (192.168.120.11)
在 Fedora 上,我更新了 /etc/httpd/conf/httpd.conf 文件以包含新的虚拟主机如下:
<VirtualHost *:80>
DocumentRoot "/pub/customercenterstaging.perceptionistinc.com"
ServerName customercenterstaging.perceptionistinc.com
</VirtualHost>
当我尝试访问此站点时,我得到的只是位于 /var/www/html/ 的 Fedora Core 测试页面。
我不熟悉使用 Apache 托管。我需要做什么/重置/弹跳才能使这个新添加生效吗?
感谢您的帮助,
布莱恩
I have inherited a website to maintain that is hosted on a VM of Fedora/Apache. The DNS for the website is maintained on a Windows 2000 Server machine.
The current setup has no test site to test changes before deployment. I have copied the contents of the website on Fedora (found at /pub/customercenter.perceptionistinc.com) to a new directory /pub/customercenterstaging.perceptionistinc.com.
I added the DNS for this new staging site to the Windows server pointing to the same IP address as the live site (192.168.120.11)
On Fedora, I have updated the /etc/httpd/conf/httpd.conf file to include a new virtual host as follows:
<VirtualHost *:80>
DocumentRoot "/pub/customercenterstaging.perceptionistinc.com"
ServerName customercenterstaging.perceptionistinc.com
</VirtualHost>
When I try to access this site all I get is the Fedora Core Test page which is found at /var/www/html/.
I am not familiar with hosting using Apache. Is there something I need to do/reset/bounce, to get this new addition live?
Thanks for your help,
Brian
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,httpd.conf 中的任何更改只有在 apache 重新启动后才会应用!如果是生产环境,我建议在另一台服务器上测试配置更改,以在上线之前解决故障。
编辑:有一个选项可以重新加载而不重新启动(不会中断当前客户端的连接)
/etc/init.d/httpd 重新加载
。请参阅此Yes, any changes in httpd.conf, will be applied only after an apache restart! If it is a production environment, I would suggest testing the config changes on another server, to resolve glitches before you go live with it.
EDIT: There is an option, to reload without restart (no disruption of connections of current clients)
/etc/init.d/httpd reload
. See this