• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Webmail - PHP not working, file downloaded not executed

TimReeves

Regular Pleskian
It's a new server I'm installing, Debian 10, a Plesk image was already installed. When selecting packages in the installer I saw that one can remove the Apache package, and since I use only Nginx I did. But then webmail was also automatically removed, so I reinstalled both Apache packages. But now I have my first domain with webmail, and it does not work. When I call https://webmail.example.com the SSL Cert is fine, but the response is to download Roundcubes initial PHP file rather than execute it. Plesk PHP 7.4 is installed, and in settings both FastCGI and FPM are allowed. A website using PHP 7.4 FPM works fine.
I've tried:
  1. plesk repair web -server
  2. plesk repair mail
  3. Deinstalling and reinstalling the Roundcube package
  4. Restarting Apache and Nginx
A correct-looking config file is there for the domain in /etc/nginx/plesk.conf.d/webmails:

NGINX:
server {
        listen 148.251.135.211:443 ssl;
        server_name "webmail.shaktisang.com";

        ssl_certificate             /opt/psa/var/certificates/scfjCWUWC;
        ssl_certificate_key         /opt/psa/var/certificates/scfjCWUWC;

        client_max_body_size 128m;

        #extension sslit begin

        if ($scheme != "https") {
                return 301 https://$host$request_uri;
        }

        #extension sslit end

        location / {
                proxy_pass https://148.251.135.211:7081;
                proxy_hide_header upgrade;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

And similarly at /etc/apache2/plesk.conf.d/webmails:

Apache config:
<VirtualHost 148.251.135.211:7080 127.0.0.1:7080>

        ServerName "webmail.shaktisang.com"

        UseCanonicalName Off

        DocumentRoot "/usr/share/psa-roundcube"
        Alias /roundcube/ "/usr/share/psa-roundcube/"

        <IfModule mod_suexec.c>
                SuexecUserGroup roundcube_sysuser roundcube_sysgroup
        </IfModule>

        <IfModule mod_fcgid.c>
                FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX plesk-php74-fastcgi
                FcgidInitialEnv PP_CUSTOM_PHP_INI "/etc/psa-webmail/roundcube/php.ini"
                FcgidMaxRequestLen 134217728
                <Directory "/usr/share/psa-roundcube">
                        Options -Indexes +FollowSymLinks
                        AllowOverride FileInfo AuthConfig Limit
                        Require all granted
                        Include "/etc/apache2/plesk.conf.d/roundcube.htaccess.inc"

                        <Files ~ (\.php$)>
                                SetHandler fcgid-script
                                FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
                                Options +ExecCGI
                        </Files>
                </Directory>
        </IfModule>

        #extension sslit begin

        RewriteEngine On
        RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
        RewriteCond %{HTTPS} off
        RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA]

        #extension sslit end
</VirtualHost>

Which all looks pretty much like the corresponding config on other machines, where it works.

I'm running out of ideas - what could it be?

Thanks, Tim
 
Well now I have solved it: When the Apache package is reinstalled by the installer, some modules which are needed are not selected. I expect it was the fcgid module.
My beef is: Howcome I install both packages and repair the mail setup, but nevertheless an Apache module required for webmail is delesected? Would be great if this could be improved!
 
  • Like
Reactions: mow
I am having the same problem after installing horde and/or roundcube. Trying to open webmail.domain.xy starts a file download instead of showing the webmail login page. The solutions in similar threads did not help on my end.

Can anyone point me in the right direction?
 
Back
Top