2017-06-11 35 views
1

我很震惊在这里,创建一个项目,项目名称是medicals。为什么无法在zend框架中查看我的项目1.12

我使用xampp。我写在http.conf中。

<VirtualHost *:8080> 
    DocumentRoot "C:/xampp/htdocs/medicals/public" 
    ServerName medicals.com 

    # This should be omitted in the production environment 
    SetEnv APPLICATION_ENV development 

    <Directory "C:/xampp/htdocs/medicals/public"> 
     Options Indexes MultiViews FollowSymLinks 
     AllowOverride All 
     Order allow,deny 
     Allow from all 
    </Directory> 

</VirtualHost> 

而且,使用Windows path:C:\Windows\System32\drivers\etc点。

127.0.0.1  medicals.com 

我有一个错误的IM我的浏览器访问medicals.com

enter image description here

在哪里实际问题。我没听懂。

提前感谢。

+0

您能检查一下,xampp的Apache版本是什么? –

回答

1

请确认您的端口是80,如果您使用的XAMPP另一个端口U可以行改变<VirtualHost *:80><VirtualHost *:8080>,8080是第二常用的端口号,你改变8080到你的端口,

您在xampp控制面板中显示的端口号PFA enter image description here

+0

这不是zend的一个特性,所有的域都被托管在这种类型 –

+0

感谢的人..得到它。你节省了我宝贵的时间.. – rubin

1

复制下面的代码:

<VirtualHost *:80> 
    ServerName medicals.com 
    DocumentRoot "C:/xampp/htdocs/medicals/public" 
    SetEnv APPLICATION_ENV "development" 
    <Directory "C:/xampp/htdocs/medicals/public"> 
     DirectoryIndex index.php 
     AllowOverride All 
     Require all granted 
    </Directory> 
</VirtualHost> 

要:

C:/xampp/apache/conf/extra/httpd-vhosts.conf 

,并添加以下行:

127.0.0.1 medicals.com 

C:/Windows/System32/drivers/etc 

并确保您的mod_rewrite已启用,并且不要忘记在更改后重新启动您的apache服务器。

这适用于zf3中的我。如果它在zf1中不起作用,你可能想看看这个。 https://framework.zend.com/manual/1.10/en/project-structure.rewrite.html

+0

@thanks,你对我的搜索,但它不适合我..为什么你 应该写在这里httpd-vhosts.conf通常我们写了C:\ xampp \ apache \ conf \ httpd.conf。 right .. – rubin

+0

你有没有取消注释行include'include/extra/httpd-vhosts.conf'在httpd.conf的第503行左右 –

+0

是取消注释,得到它 – rubin