Problem with global alias and PHP

Discussion in 'General' started by BrojJedan, Jun 2, 2021.

  1. BrojJedan

    BrojJedan New Member

    Hi all,
    first of all, I am not a guru in ISPConfig, so please be kind :)

    I have a weird issue. When adding a global alias ( domain.tld/mail ) I want to open rainloop app webpage.
    This works as long as PHP on that particular domain is disabled. As soon as I enable it, it errors out. I get a page with: "File not found.", and my error log lists: AH01071: Got error 'Primary script unknown'

    I am using the latest and greatest ISPConfig 3.2. As for the PHP, I am using 7.3 or 7.4 PHP-FPM. Fast-CGI works as expected, but I cannot use it, because it breaks wordpress web pages.

    Please, does anyone have an idea what the problem is?
    Thanks in advance!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you missed configuring a PHP handler in your railoop apache config file. Rainloop mus use it's own PHP handler, it can not use the one from the website as each website runs under a different user. have a look how roundcube is installed on ISPConfig systems, RoundCube sues it's own PHP handler. A batter way than using a global alias for a custom software is using a website like webmail.yourdomain.tld btw.

    That's wrong, FastCGI works fine with WordPress pages. If it does not work on your system, then you either made an error while installing ISPConfig or you did not install WordPress properly. But FastCGI is deprecated, so you should use PHP-FPM anyway.
     
  3. BrojJedan

    BrojJedan New Member

    Thank you, Till.
    The problem is that I would like every domain I am hosting to be able to access rainloop like so:
    domain.tld/mail, domain2.tld/mail..

    That is how I had it configured on my old server (also ISPConfig). And it worked like a charm.

    So I just tried to replace rainloop files with a simple index.html file, and it works correctly. So there is a problem with PHP. I also have the same problem with phpmyadmin.
    Will try to install roundcube and see how that is set up and try to copy the settings.

    As far as FastCGI goes, the server was installed fresh and I did not touch the settings. I will probably just remove it and be done with it.

    Thanks again.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I explained above what you have to do in that case. All you have to do is to configure a PHP handler in the rainloop file to ensure that PHP is run as www-data user and not by the website PHP.

    And be aware that chrooting PHP might be incompatible with such a global handler, so do not enable that option if you want to use a global alias. If you enabled it, then this might be even the reason for your Wordpress issue btw. Chrooting has its own limitations and might fail depending on your site.

    Don't do that, your system will fail then as fastcgi is used by ispconfig.
     
  5. BrojJedan

    BrojJedan New Member

    OK, will try that first.

    As for the FastCGI, I will only remove it from the dropdown list, not the system. But thanks for the warning. That would be another long and painful headache!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Btw. using a global alias /mail will make ispconfig fail as the mail module will stop working as it will redirect all requests to the/mail/ folder inside of ispconfig UI to rainloop.. using /webmail as shown in the install instructions is fine though.
     
  7. BrojJedan

    BrojJedan New Member

    I have installed roundcube on a separate VM. I wanted to check the configuration and do something similar on rainloop.
    I looked into /etc/apache2/conf-available/roundcube.conf among other files, but there is no mention of handlers.
    Where is this set? Dumb question, I know, but I warned you I am a noob, sorry :)
     
  8. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    You could look at website vhost files, or the ispconfig vhost file, for examples of setting php handlers. If you do not have one set for that vhost, it will be using the default handler, which nowadays is usually set with something like 'a2enconf php7.4-fpm'.
     

Share This Page