Symfony2应用程序的空白页面

时间:2016-11-28 11:41:45

标签: apache symfony amazon-ec2 ubuntu-16.04

在设置了Web环境(Apache2,MySQL,PHP7)后,我刚刚在AWS账户上(使用Ubuntu 16.04在EC2实例上)部署了基于Symfony2的应用程序。 Ubuntu /var/www/html/index.html默认文件正确呈现。但是当谈到Symfony2时,我的app.php和app_dev.php都有一个空白页面。当我使用Filezilla调试工具进行测试时,我可以看到" 500内部服务器错误"出现错误消息。 Symfony2 config.php表示现在一切正常,我只需要在php.ini上添加date.timezone值。我的.htaccess文件配置得很好,因为我使用的是与我之前设置的其他基于Symfony2的网站相同的模型。

这就是我在/logs/dev.log上的内容:

[2016-11-27 18:23:09] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] []
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] []
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] []
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate". [] []
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] []
[2016-11-27 18:23:09] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] []
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] []
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] []
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] []
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate". [] []
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] []
[2016-11-27 18:39:22] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] []
[2016-11-28 00:44:05] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] []
[2016-11-28 00:44:05] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] []
[2016-11-28 00:44:05] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand". [] []
[2016-11-28 00:44:05] php.DEBUG: The Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\DebugHandlerPass class is deprecated since version 2.12 and will be removed in 3.0. Use AddDebugLogProcessorPass in FrameworkBundle instead. {"type":16384,"file":"/var/www/html/vendor/symfony/monolog-bundle/DependencyInjection/Compiler/DebugHandlerPass.php","line":14,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Passing a string as the $source argument of Twig_Environment::tokenize() is deprecated since version 1.27. Pass a Twig_Source instance instead. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":604,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Defining the initRuntime() method in the "form" extension is deprecated since version 1.23. Use the `needs_environment` option to get the Twig_Environment instance in filters, functions, or tests; or explicitly implement Twig_Extension_InitRuntimeInterface if needed (not recommended). {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/Environment.php","line":794,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in WebProfilerBundle:Collector:form.html.twig at line 611. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 205. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 323. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 325. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 337. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 339. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 351. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} []
[2016-11-28 00:44:06] php.DEBUG: Twig Test "sameas" is deprecated since version 1.21. Use "same as" instead in form_div_layout.html.twig at line 353. {"type":16384,"file":"/var/www/html/vendor/twig/twig/lib/Twig/ExpressionParser.php","line":646,"level":4352} []
[2016-11-28 00:44:06] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate". [] []
[2016-11-28 00:44:06] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] []
[2016-11-28 00:44:06] event.DEBUG: Notified event "console.terminate" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onTerminate". [] []

我还检查了/var/log/apache2/error.log:

[Mon Nov 28 06:25:02.181251 2016] [mpm_prefork:notice] [pid 13742] AH00163: Apa$
[Mon Nov 28 06:25:02.181268 2016] [core:notice] [pid 13742] AH00094: Command li$
[Mon Nov 28 09:34:27.731905 2016] [:error] [pid 18830] [client 41.251.22.4:4926$
[Mon Nov 28 09:34:27.732394 2016] [:error] [pid 18830] [client 41.251.22.4:4926$
[Mon Nov 28 09:35:51.425233 2016] [:error] [pid 18832] [client 41.251.22.4:5048$
[Mon Nov 28 09:38:09.621647 2016] [:error] [pid 18829] [client 41.251.22.4:5103$
[Mon Nov 28 09:38:09.621901 2016] [:error] [pid 18829] [client 41.251.22.4:5103$
[Mon Nov 28 09:46:16.528434 2016] [:error] [pid 18831] [client 41.251.22.4:2130$
[Mon Nov 28 09:46:16.528644 2016] [:error] [pid 18831] [client 41.251.22.4:2130$
[Mon Nov 28 09:48:41.956055 2016] [:error] [pid 18832] [client 41.251.22.4:5224$
[Mon Nov 28 09:48:41.956345 2016] [:error] [pid 18832] [client 41.251.22.4:5224$
[Mon Nov 28 09:49:06.614155 2016] [:error] [pid 18829] [client 41.251.22.4:5228$
[Mon Nov 28 09:49:06.614356 2016] [:error] [pid 18829] [client 41.251.22.4:5228$
[Mon Nov 28 10:07:58.290011 2016] [:error] [pid 18831] [client 41.251.22.4:5284$
[Mon Nov 28 10:07:58.290215 2016] [:error] [pid 18831] [client 41.251.22.4:5284$
[Mon Nov 28 10:09:25.032732 2016] [:error] [pid 21233] [client 41.251.22.4:5287$
[Mon Nov 28 10:09:25.032947 2016] [:error] [pid 21233] [client 41.251.22.4:5287$
[Mon Nov 28 10:09:44.034353 2016] [:error] [pid 18829] [client 41.251.22.4:5288$
[Mon Nov 28 10:09:44.034556 2016] [:error] [pid 18829] [client 41.251.22.4:5288$

有关如何使用这些信息来解决我的问题的任何线索,特别是在日志上?

1 个答案:

答案 0 :(得分:0)

我已经能够通过运行app / console资产解决此问题:在开发环境中安装和清除缓存(app / console cache:clear)。然后,我不得不处理以下异常:

  

ClassCollectionLoader.php第239行中的RuntimeException:无法写入缓存文件" /var/www/html/app/cache/dev/classes.php"。

我按照此处提供的说明保留:http://symfony.com/doc/2.7/setup/file_permissions.html

对于Linux系统:

$ rm -rf app/cache/*
$ rm -rf app/logs/*    

$ HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|

[n]ginx' | grep -v root | head -1 | cut -d\  -f1`
# if this doesn't work, try adding `-n` option
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
$ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs