title: php symfony and apache2 - inst't serving .phtml
body: <p>I have a problem with apache2 settings (Ubuntu system).
  I would like to run symfony project on my localhost but instead of serving .phtml files, browser is trying to download files.</p>
  
  <p><a href="http://www.freeimagehosting.net/uploads/ba9be708fc.gif" rel="nofollow noreferrer">alt text http://www.freeimagehosting.net/uploads/ba9be708fc.gif</a></p>
  
  <p>this is my file .host:</p>
  
  <blockquote>
    <p>127.0.0.3 test</p>
  </blockquote>
  
  <p>this is apache2/sites-available/default file</p>
  
  <blockquote>
    <p>&lt; VirtualHost 127.0.0.3:80><br>
    ServerName test   DocumentRoot
    "/home/m/Pr/workspace/php/test/web"</p>
    
    <p>DirectoryIndex frontend_dev.php  </p>
    
    <p>&lt; Directory
    "/home/m/Pr/workspace/php/test/web"></p>
  
  <pre><code>AllowOverride All
  
  Allow from All   
  </code></pre>
    
    <p></p>
    
    <p>Alias /sf</p>
    
    <p>/home/m/Pr/workspace/php/test/lib/vendor/symfony/data/web/sf</p>
    
    <p>&lt; Directory</p>
    
    <p>"/home/m/Pr/workspace/php/test/lib/vendor/symfony/data/web/sf"></p>
  
  <pre><code>AllowOverride All
  
  Allow from All   &lt;/Directory&gt;
  </code></pre>
    
    <p>and this is .htaccess in /test</p>
    
    <p>RewriteEngine On RewriteRule ^(.*)$</p>
    
    <p>/web/$1 Options +FollowSymLinks</p>
    
    <p>+ExecCGI AddHandler application/x-httpd-php5 .php .phtml</p>
    
    <p> </p>
  </blockquote>
  
  <p>and this is .htaccess in /test/web</p>
  
  <blockquote>
    <p>Options +FollowSymLinks +ExecCGI</p>
    
    <p><br>
    RewriteEngine On</p>
    
    <p># uncomment the following line, if
    you are having trouble   # getting
    no_script_name to work   RewriteBase /</p>
    
    <p># we skip all files with .something 
      #RewriteCond %{REQUEST_URI} ..+$   #RewriteCond %{REQUEST_URI} !.html$<br>
      #RewriteRule .* - [L]</p>
    
    <p># we check if the .html version is
    here (caching)   RewriteRule ^$
    index.html [QSA]   RewriteRule
    ^([^.]+)$ $1.html [QSA]   RewriteCond
    %{REQUEST_FILENAME} !-f</p>
    
    <p># no, so we redirect to our front
    web controller   RewriteRule ^(.*)$
    index.php [QSA,L] </p>
  </blockquote>
  
  <p>Another problem is I think apache don't read  .htaccess files.</p>
  
  <p>What am i doing wrong? Maybe I forgot about something?  Please, help me becouse i have no idea.</p>