I have a solution, here in vhost under nginx:
fastcgi_param SYMFONY__KERNEL__LOGS_DIR "/path/to/logs";
fastcgi_param SYMFONY__KERNEL__CACHE_DIR "/path/to/cache";
And in the AppKernel.php file:
public function getCacheDir()
{
if (!empty($this->getEnvParameters()['kernel.cache_dir'])) {
return $this->getEnvParameters()['kernel.cache_dir'].'/'.$this->environment;
} else {
return parent::getCacheDir();
}
}
public function getLogDir()
{
if (!empty($this->getEnvParameters()['kernel.logs_dir'])) {
return $this->getEnvParameters()['kernel.logs_dir'].'/'.$this->environment;
} else {
return parent::getLogDir();
}
}
thank,
Fabris
source
share