[英]Mezzio skeleton application on Centos 8
I try to run a Mezzio application on my server I do the following steps : - Create a Mezzio project我尝试在我的服务器上运行 Mezzio 应用程序我执行以下步骤: - 创建一个 Mezzio 项目
composer create-project mezzio/mezzio-skeleton symphonie
I choose modular application, fast router, service manager, plates renderer and Whoops I create my virtual host like this :我选择模块化应用程序、快速路由器、服务管理器、板渲染器和哎呀我像这样创建我的虚拟主机:
<VirtualHost *:80>
Alias /symphonie "/data/symphonie/public"
<Directory "/data/symphonie">
Options Indexes MultiViews FollowSymlinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
But when I enter this url in Google Chrome : https://app.inra.fr/symphonie/ I got a 404 error.但是当我在谷歌浏览器中输入这个网址时: https : //app.inra.fr/symphonie/我收到了 404 错误。 I have no messages in the apache logs.
我在 apache 日志中没有消息。 By cons all the links on the page redirects me to https://app.inra.fr/ and not to https://app.inra.fr/symphonie/ Here is the configuration of my server:
通过缺点页面上的所有链接将我重定向到https://app.inra.fr/而不是https://app.inra.fr/symphonie/这是我的服务器的配置:
Do you have any leads to solve my problem?你有任何线索可以解决我的问题吗?
thanks in advance提前致谢
Shishi石狮
Mezzio application does not have built-in support for base path. Mezzio 应用程序没有对基本路径的内置支持。
You would need to handle following aspects:您需要处理以下几个方面:
mezzio/mezzio-helpers
package. mezzio/mezzio-helpers
包中提供了 url helper。 Middleware from the previous step could also be used to inject base path into url helper. Mezzio documentation have the page covering this use case: https://docs.mezzio.dev/mezzio/v3/cookbook/using-a-base-path/ Mezzio 文档有涵盖此用例的页面: https ://docs.mezzio.dev/mezzio/v3/cookbook/using-a-base-path/
It is not too detailed and pull requests to improve it are welcome ;)它不是太详细,欢迎请求改进它;)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.