dockerize project #3
@ -5,14 +5,18 @@
|
||||
DirectoryIndex /index.php
|
||||
|
||||
<Directory /var/www/project/public>
|
||||
AllowOverride None
|
||||
AllowOverride All
|
||||
Order Allow,Deny
|
||||
Allow from All
|
||||
Require all granted
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
<Directory /var/www/project/public/bundles>
|
||||
FallbackResource disabled
|
||||
</Directory>
|
||||
|
||||
# <Directory /var/www/project/public/bundles>
|
||||
# FallbackResource disabled
|
||||
# </Directory>
|
||||
ErrorLog /var/log/apache2/project_error.log
|
||||
CustomLog /var/log/apache2/project_access.log combined
|
||||
</VirtualHost>
|
||||
</VirtualHost>
|
22
src/test.php
Normal file
22
src/test.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
|
||||
use Symfony\Component\HttpKernel\KernelEvents;
|
||||
|
||||
class test implements EventSubscriberInterface
|
||||
{
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return [KernelEvents::EXCEPTION => 'onKernelException'];
|
||||
}
|
||||
|
||||
public function onKernelException(ExceptionEvent $event)
|
||||
{
|
||||
$event->setResponse(new Response('test'));
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user