如何使用 Zend Community CE 在 Windows 计算机上正确设置虚拟主机?

发布于 2024-08-26 04:06:52 字数 556 浏览 2 评论 0原文

我已经在 Windows 计算机上设置了 Zend Server CE,并且在设置虚拟主机时遇到了最困难的时刻。无论我做什么,本地计算机上的链接在路径中显示“localhost”,导致所有图像和链接无法正常工作。

我的虚拟主机文件中有以下内容,当站点加载时,大多数链接显示“其中的本地主机”。请帮忙。

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot D:\zend_server_ce\Apache2\htdocs\domain.dev
ServerName www.domain.dev
ServerAlias www.domain.dev *.domain.dev domain.dev

<Directory D:\zend_server_ce\Apache2\htdocs\domain.dev\>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

I have set up Zend Server CE on a windows machine and am having the hardest time setting up virtual hosts. No matter what I do, links on my local machine are showing "localhost" in the path causing all images and links to not work properly.

I have the following in my vhosts file and while the site loads up, most links show "local host in them". Please help.

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot D:\zend_server_ce\Apache2\htdocs\domain.dev
ServerName www.domain.dev
ServerAlias www.domain.dev *.domain.dev domain.dev

<Directory D:\zend_server_ce\Apache2\htdocs\domain.dev\>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文