HHVM and Rewrite rules

Discussion in 'Installation/Configuration' started by zicguy, Apr 21, 2017.

  1. zicguy

    zicguy Member

    After the Ispconfig 3.1 installation following The Perfect Server - Debian 8.4 Jessie (Apache2, BIND, Dovecot, ISPConfig 3.1), I tried the HHVM mode on a website which is installed in a sub directory of the webpath root. e.g. webpath root: /web ; website installed in /web/test.
    In order to point in the subdirectory, I configured the website with a redirection in IspConfig (Type: L, Redirection path: /test/). Then, when I tried to display the website, I had the following error:
    404 Not Found - The requested URL /hhvm-fcgi/index.php was not found on this server.

    After a lot of research, the only solution I found was to add the following in the vhost file:
    RewriteCond %{REQUEST_URI} !^/hhvm-fcgi/ just after RewriteCond %{REQUEST_URI} !^/php5-fcgi/

    So, for a long time solution I modified the /usr/local/ispconfig/server/conf/vhost.conf.master file which contains the ipsconfig Vhost template, to also add RewriteCond %{REQUEST_URI} !^/hhvm-fcgi/. In this way, vhosts always contains this modification for website installed in a subdirectory.

    Hope this can help. Does this issue is a Ipsconfig 3.1 / HHVM bug?
  2. LotNoMore

    LotNoMore Member

    I am using the same setup for up to 10 subdomains but do not see error for any subdomain. Maybe because I have created a DNS Zone for each subdomain inside ISPconfig?
  3. zicguy

    zicguy Member

    Thanks for your feedback.
    Maybe... the server I use doesn't manage DNS for this website. I didn't create subdomain in ISPConfig interface. I just defined a website which points to a subdirectory.

Share This Page