繁体   English   中英

在Zend Framework 3的Centos上安装Apache虚拟主机

[英]Apache Virtual Host Setup on Centos for Zend Framework 3

我是zf3的新手,已从GitHub将ZF3骨架应用程序提取到位置/var/www/html/zf2-tutorial ,并已成功安装以从URL https://xxx.xxx.xx.xx/zf2-tutorial/public获得zf3主页。 https://xxx.xxx.xx.xx/zf2-tutorial/public

在阅读本教程的过程中,我发现我必须设置一个虚拟主机来访问zf2-tutorial.localhost类的站点,因此我按照步骤在/etc/httpd/conf.d文件夹下创建了zf2-tutorial.conf文件。

zf2-tutorial.conf

<VirtualHost *:80>
ServerName https://xxx.xxx.xx.xx/zf2-tutorial
DocumentRoot /var/www/html/zf2-tutorial/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/html/zf2-tutorial/public>
    DirectoryIndex index.php
    AllowOverride All
    Require all granted
</Directory>

我还编辑了/etc/hosts文件以添加

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
xxx.xxx.xx.xx  xxx.xxx.xx.xx/zf2-tutorial

我只想通过访问URL来访问zf3主页

https://xxx.xxx.xx.xx/zf2-tutorial/

我正在使用httpd-2.4.6-67.el7.centos.6.x86_64

教程链接https://docs.zendframework.com/tutorials/getting-started/skeleton-application/

您是否在https.conf文件中包括了新的zf2-tutorial.conf文件?

# include zf2 tutorial host file
Include /etc/httpd/conf.d/zf2-tutorial.conf

还是在配置中该路径是否有通配符?

Include /etc/httpd/conf.d/*.conf

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM