• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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