1

I am having trouble getting Roundcube 1.6.1 to work on my server. I believe some pre-existing configuration on my server may interfere with Roundcube but I am unsure. Here is what I have set up so far:

  1. I have Odoo installed on my server within a Python3 virtual environment hosted on the primary domain.
  2. Odoo is running on Apache2 web server on port 8069 (default) and is reverse proxied from its virtual host configuration so it is accessible on ports 80/443.

I have downloaded Roundcube and installed the following PHP extensions:

sudo apt install php-net-ldap2 php-net-ldap3 php-imagick php8.1-common php8.1-gd php8.1-imap php8.1-mysql php8.1-curl php8.1-zip php8.1-xml php8.1-mbstring php8.1-bz2 php8.1-intl php8.1-gmp php8.1-redis

I have also configured an Apache2 Virtual Host for Roundcube:

<VirtualHost *:80>
  ServerName mail.MyDomain.com
  DocumentRoot /var/www/roundcube/

  ErrorLog ${APACHE_LOG_DIR}/roundcube_error.log
  CustomLog ${APACHE_LOG_DIR}/roundcube_access.log combined

  <Directory />
    Options FollowSymLinks
    AllowOverride All
  </Directory>

  <Directory /var/www/roundcube/>
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
  </Directory>

</VirtualHost>

However, when I visit mail.MyDomain.com, I receive the following error message: "Unsupported PHP version. Required PHP >= 7.3." The subdomain works and the Roundcube favicon appears, which means the domain configuration is correct and Apache2 is reading from the correct directory. Therefore this error implies an issue with my Apache2 PHP version.

I tried installing libapache-mod-php8.1 and enabling it. However, upon reloading my website, both the mail subdomain and the Odoo primary domain broke, so I had to disable it and reload again (sudo a2dismod).

How should I configure Roundcube to work with mail.MyDomain.com? Any advice is appreciated, thanks

  • >=7.3 may not necessarily mean that it is compatible with 8.x. – Sammitch Jun 16 '23 at 03:00
  • I hadn't considered that. I'll try 7.4 then. But I'm worried it might break my Odoo instance too. Still, it's worth a shot. Thanks Sammitch – Silent Watcher Jun 16 '23 at 03:13
  • So I tried installing PHP 7.4 dependencies of Roundcube, installed libapache2-mod-php7.4, and enabled it. Something different happened. The website didn't break, primary domain is still accessible, but Roundcube still says "Unsupported PHP version. Required PHP >= 7.3". Strange – Silent Watcher Jun 16 '23 at 05:38
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 16 '23 at 06:16
  • @ bot: I have a PHP version 8 but Roundcube does not accept it. Even when I changed to version 7, it still doesn't accept it – Silent Watcher Jun 16 '23 at 07:41
  • I think I'm getting closer to the solution. I tried sudo a2dismod php* and saw that php7.2 was still active. This could be causing the issue. After disabling php* mods for Apache2, I restarted, and enabled 7.4 mod. It shows me a different error. Now the page says "Oops... Something went wrong!". I'll re-examine php7.4 and check again. – Silent Watcher Jun 17 '23 at 01:38

1 Answers1

0

I solved it. The answer is a misconfigured Roundcube config.php file. In the Roundcube config file, there was a database link

$config['db_dsnw'] = 'mysql://roundcube:MyPassword/roundcubemail';

I checked it's missing @localhost. It should have been like this:

$config['db_dsnw'] = 'mysql://roundcube:MyPassword@localhost/roundcubemail';

After this, the Roundcube website loads, and I can test logging in