简体   繁体   English

Symfony 3具有1个vhost和2个环境

[英]Symfony 3 with 1 vhost and 2 environments

I would like to test my Symfony 3 site in 2 different environments with 1 VHOST only. 我想在2个不同的环境中使用1个VHOST测试我的Symfony 3站点。 Let me explain, I go through app_dev I have the module xdebug to "on" and the modules opcache and apcu to off, this is ok. 让我解释一下,我通过app_dev我有模块xdebug到“on”和模块opcache和apcu关闭,这没关系。 I would like to pass my site in prod (so without going through app_dev) on the same vhost but with the module xdebug to off and modules apcu and opcache to on. 我想在同一个虚拟主机上传递我的网站prod(所以不通过app_dev)但是模块xdebug关闭,模块apcu和opcache开启。

Is it possible? 可能吗? What is the best solution? 什么是最好的解决方案?

Thank you. 谢谢。

Don't. 别。 Apache virtualhosts are cheap and are not difficult to setup. Apache虚拟主机很便宜,并且不难设置。 Even having Xdebug installed on the machine will slow down your production environment. 即使在机器上安装Xdebug也会降低生产环境的速度。 There is also no way to say in a single Vhost that the prod env would use a different configuration than dev. 在单个Vhost中也没有办法说prod env将使用与dev不同的配置。

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

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