【发布时间】:2017-05-22 17:39:22
【问题描述】:
我用我的 Mac 设置了一台新的开发机器。 现在我安装了 zend 框架骨架应用程序。
当我打开网址时,它会在我的浏览器中显示 index.php 的源代码,而不是网站。
进入 /etc/apache2/httpd-vhosts.conf 我添加了这个:
<VirtualHost *:80>
ServerName test.dev
ServerAdmin info@abc.de
DocumentRoot "/Users/myname/Projekte/web/test/public/"
SetEnv APPLICATION_ENV "development"
<Directory "/Users/myname/Projekte/web/test/public/" >
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
ErrorLog "/private/var/log/apache2/test.dev-error_log"
CustomLog "/private/var/log/apache2/test.dev-access_log" common
我能做些什么来解决这个问题? 我的公共目录需要 .htaccess 吗?
感谢您的帮助。
【问题讨论】:
-
我已经安装了 Apache/2.4.23 (Unix)
-
对我来说似乎是 apache 问题,而不是 ZF2/3 问题。你是怎么安装apache的?您如何检查 mod_php 是否已安装或您的 PHP-FPM 是否已启动并运行?
-
谢谢,你说得对。 LoadModule php5_module libexec/apache2/libphp5.so 现在可以正常工作了。
标签: zend-framework3 skeleton-code