Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm new to Symfony2 and following the EnsJobeet tutorial. My VirtualHost config is as follows:

<VirtualHost *:80>
    ServerName jobeet.local
    DocumentRoot /var/www/ensjobeet/web/
    DirectoryIndex app.php
    ErrorLog /var/log/apache2/jobeet-error.log
    CustomLog /var/log/apache2/jobeet-access.log combined
    <Directory "/var/www/ensjobeet/web/">
        AllowOverride All
        Allow from All
    </Directory>
</VirtualHost>

When I make requests to jobeet.local/app_dev.php/job/ I get the jobs page, when I make requests to jobeet.local/app.php/job/ I get the jobs page. However requests to jobeet.local/job/ 404 with The requested URL /job/ was not found on this server.

I would have thought that requests jobeet.local/ and jobeet.local/app.php/ would have been equivalent but they don't appear to be so is there some other aspect of the environment configuration I have wrong?

share|improve this question

2 Answers 2

mod_rewrite was installed but not enabled. Silly me!!

share|improve this answer

Here an exemple for prod and dev vhosts

# Symfony 2 : monapp.dev
<virtualHost *:80>
  ServerName monapp.dev
  DocumentRoot /data/www/MonApp/web/

    <Directory "/data/www/MonApp/web">
      DirectoryIndex app_dev.php
      Options -Indexes FollowSymLinks SymLinksifOwnerMatch
      AllowOverride None
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.*)$ app_dev.php [QSA,L]
    </Directory>
</VirtualHost>

# Symfony 2 : monapp.prod
<VirtualHost *:80>
  ServerName monapp.prod
  DocumentRoot /data/www/MonApp/web/

    <Directory "/data/www/MonApp/web">
       DirectoryIndex app.php
       Options -Indexes FollowSymLinks SymLinksifOwnerMatch
       AllowOverride All
       Allow from All
    </Directory>
</VirtualHost>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.