• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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