localhost vs hostname,主机名无法正常工作

时间:2016-10-07 17:55:36

标签: apache localhost cakephp-1.3 httpd.conf

我有一个cakePHP应用程序(旧的1.3x)工作(生产)。现在我正试图在我的win7上安装wamp - 用于开发目的。
我正在使用“bitnami”的wamp。

为此 - 我更改了添加hosts行的127.0.0.1 mydomain文件 我还更改了httpd.conf文件,添加了以下内容:

NameVirtualHost *:80
<VirtualHost *:80>
  ServerName mydomain
  DocumentRoot "D:\wamp/apache2/htdocs/foldername"
  DirectoryIndex index.php index.html
</VirtualHost>

已经完成了。 访问http://localhost/folder有效(一些内部链接问题,但预计 - 因为它有一些相对网址)

访问http://mydomain会返回200 / ok响应,但它是空的。

我做错了什么?

1 个答案:

答案 0 :(得分:0)

好像一切都很好。我简单地评论了require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';行...... 做了它作为一个临时测试,当我ctrl+z改变时,我把它保留下来。

它是固定的。 感谢