Rouncube PHP Script

Discussion in 'Installation/Configuration' started by stef157, Jul 23, 2018.

  1. stef157

    stef157 Member

    Hi all,
    I just enable http/2 on my server with :
    Code:
    a2dismod : mpm_prefork php7.0
    a2enmod : mpm_event http2
    With this, http/2 is working but get in trouble with some "folder" like /webmail and /phpmyadmin

    An idea how to solve this ?
    Thanks!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Web-based apps that are installed as Debian packages like the two ones that you mentioned use mod_php by default (that's not ISPConfig specific btw), so when you switch to an mpm that does not support mod_php, then they will fail. You'll probably have to configure an other global PHP handler to use them or you create websites in ISPConfig for PHPMyAdmin and Roundcube and install these tow software packages into the websites.
     
  3. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

  4. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    another approach would be to simulate mod_php behaviour, which would continue providing aeverything like before .... and that's it, maybe you provide the secure connection trough proxy where this is just an upstream server... who knows

    /etc/apache2/conf-enabled/php7.1-fpm.conf
    Code:
    # Redirect to local php-fpm if mod_php is not available
    <IfModule !mod_php7.c>
    <IfModule proxy_fcgi_module>
        # Enable http authorization headers
        <IfModule setenvif_module>
        SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
        </IfModule>
    
        <FilesMatch ".+\.ph(ar|p|tml)$">
            SetHandler "proxy:unix:/run/php/php7.1-fpm.sock|fcgi://localhost"
        </FilesMatch>
        <FilesMatch ".+\.phps$">
            # Deny access to raw php sources by default
            # To re-enable it's recommended to enable access to the files
            # only in specific virtual host or directory
            Require all denied
        </FilesMatch>
        # Deny access to files without filename (e.g. '.php')
        <FilesMatch "^\.ph(ar|p|ps|tml)$">
            Require all denied
        </FilesMatch>
    </IfModule>
    </IfModule>
    
     
    stef157 and Jesse Norell like this.
  5. stef157

    stef157 Member

    Hi,
    Thanks for this !

    It work like a charm.

    Have a nice day
     
    Last edited: Jul 25, 2018

Share This Page