php5-fpm + rewrite rules in vhost conf not working

Discussion in 'Installation/Configuration' started by Aisfrond, Dec 27, 2015.

  1. Aisfrond

    Aisfrond New Member


    I have Ispconfig3 on ubuntu 14.04.3 LTS, apache.

    I have this problem: I set PHP-FPM and then I want to set AllowOverride None in order to set rewrite rules in the vhost config file.
    (I don't want to use .htaccess)
    So in ispconfig admin, under option of the single website, I put under 'Apache Directives' the following code:

    <Directory /var/www/>
    Options All -Indexes
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* index.php [L]

    it doesn't work! I get 'File not found' error 404

    It works under fast-CGI and mod-php, but not under PHP-FPM.

    What am I doing wrong?
    Thanks in advance,
  2. Aisfrond

    Aisfrond New Member ideas?
    What am I doing wrong?
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to add the code twice, once for the symlink path:

    <Directory /var/www/>

    and a second time for the real directory:

    <Directory /var/www/clients/client0/web1/web>
  4. Aisfrond

    Aisfrond New Member

    ok, perfect!
    It works!

Share This Page