ziiweb ziiweb - 10 months ago 73
Apache Configuration Question

Symfony 3.1: error when requesting app_dev.php or app.php

Im getting this when requesting


Not Found

The requested URL /app_dev.php/ was not found on this server.

And when requesting

unregister(); $apcLoader->register(true); */ $kernel = new
AppKernel('prod', false); $kernel->loadClassCache(); //$kernel = new
AppCache($kernel); // When using the HttpCache, you need to call the
method in your front controller instead of relying on the
configuration parameter
//Request::enableHttpMethodParameterOverride(); $request =
Request::createFromGlobals(); $response = $kernel->handle($request);
$response->send(); $kernel->terminate($request, $response);

Im on Ubuntu 14.04 and Apache 2.4

EDIT: This is my virtual host:

<VirtualHost *:80>
ServerName sorial
#ServerAlias sorial.es
DocumentRoot /var/www/sorial/web
DirectoryIndex app.php
<Directory /var/www/sorial/web/>
# Options Indexes FollowSymLinks MultiViews
AllowOverride All
#Order allow,deny
#allow from all
Require all granted
FallbackResource /index.php
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 10 days"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/plain "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-icon "access plus 1 year"

And my document root is at

The truth is I have the same problem for the rest of my sites. The problem started when I try to disable/enable
a2dismod env
, since when adding the variable
(as you can see in my virtual host) I was getting

Job for apache2.service failed because the control process exited with
error code. See "systemctl status apache2.service" and "journalctl
-xe" for details.

when restarting apache.

Answer Source

I finally solved my problem installing php5 and libapache2-mod-php5 like this: sudo apt-get install php5 libapache2-mod-php5