使用apache端口8080在xampp上为zendframework设置virtualhost

问题描述 投票:0回答:1

我是zendframework的初学者。开始向Zend Tutorial学习。能够通过作曲家下载zend骨架应用程序。因为我正在使用XAMPP(端口8080),所以我更喜欢为骨架应用程序设置VirtualHost。但它没有用。

我的httpd-vhost.conf文件包含(在httpd.conf中启用)

<VirtualHost *:8080>
DocumentRoot "E:\xampp\htdocs\app_zend\skeleton_application\public"
ServerName zf-tutorial.localhost
SetEnv APPLICATION_ENV "development"
<Directory "E:\xampp\htdocs\app_zend\skeleton_application\public">
    DirectoryIndex index.php
    AllowOverride All
    Require all granted
</Directory>

我的主机文件包含

127.0.0.1 zf-tutorial.localhost localhost

当我输入http://zf-tutorial.localhost:8080/时,我会看到以下屏幕

Screenshot_object_not_found

请帮我解决这个问题。我也搜索了类似的问题,但没有找到适合我的任何解决方案。

我也以类似的方式为我的CodeIgniter项目创建了vhost。这很有效。但是对于zend它不起作用。

php apache zend-framework virtualhost vhosts
1个回答
0
投票

尝试使用VirtualHost *:80

<VirtualHost *:80>
  DocumentRoot "E:\xampp\htdocs\app_zend\skeleton_application\public"
  ServerName zf-tutorial.localhost
  SetEnv APPLICATION_ENV "development"
  <Directory "E:\xampp\htdocs\app_zend\skeleton_application\public">
      DirectoryIndex index.php
      AllowOverride All
      Require all granted
 </Directory>
</VirtualHost>
© www.soinside.com 2019 - 2024. All rights reserved.