https2 support ispconfig centos 7

Discussion in 'ISPConfig 3 Priority Support' started by JOP, Dec 21, 2019.

  1. JOP

    JOP Member HowtoForge Supporter

    doesn't get http2 work in ispconfig based on centos 7.x
    It seems http2 needs at least apache version 2.4.27.
    HowTo upgrade centos 7.x to apache version greater 2.4.27 with ispconfig?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I don't use CentOS in production setups, so I can't give you the exact steps.
  3. JOP

    JOP Member HowtoForge Supporter

    I used repro "codeit" to install apache 2.4.44.
    cd /etc/yum.repos.d && wget`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo

    Installed apache 2.4.44 but apache didn't start with "" o r"" - only with "". But with that HTTP2 doesn't work. Besides ispconfig Monitor reports erroe, doesn't see that apache is running.

    Any idea what's the problem an how to get apache 2.4.44 with ispconfig and mod_mpm_event work?

    LoadModule mpm_prefork_module modules/
    # LoadModule mpm_worker_module modules/

    ###worker or event###
    # systemctl status httpd.service
    ● httpd.service - The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Sat 2019-12-21 17:40:17 CET; 30s ago
    Docs: man:httpd.service(8)
    Process: 6438 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
    Main PID: 6438 (code=exited, status=1/FAILURE)
    Status: "Reading configuration..."

    Dec 21 17:40:17 systemd[1]: Starting The Apache HTTP Server...
    Dec 21 17:40:17 httpd[6438]: [Sat Dec 21 17:40:17.637872 2019] [alias:warn] [pid 6438:tid 14024800541...lias.
    Dec 21 17:40:17 httpd[6438]: AH00526: Syntax error on line 31 of /etc/httpd/conf.d/php.conf:
    Dec 21 17:40:17 httpd[6438]: Invalid command 'php_value', perhaps misspelled or defined by a module n...ation
    Dec 21 17:40:17 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
    Dec 21 17:40:17 systemd[1]: Failed to start The Apache HTTP Server.
    Dec 21 17:40:17 systemd[1]: Unit httpd.service entered failed state.
    Dec 21 17:40:17 systemd[1]: httpd.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is not ISPConfig here as ISPConfig works fine with all apache versions out of the box. The problem in your case is the apache mod_php module. You have to remove mod_php and its config parts as they are not compatible with mpm_event like the one mentioned in the error:

    Syntax error on line 31 of /etc/httpd/conf.d/php.conf

    Probably the whole php.conf needs to be removed, copy it to a save place on your harddisk like the /root/ folder for testing and restart apache.

    And regarding ispconfig monitor, ensure that the new apache listens on port 80 and 443 on localhost as well.
  5. JOP

    JOP Member HowtoForge Supporter

    removed php.conf, apache starts but ispconfig:8080 config site only shows apache test page
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    you must install the same apache modules for the enw apache than the modules that you installed for the old one. In your case, probably the fcgi module is not installed, but there might be other modules missing as well.
  7. JOP

    JOP Member HowtoForge Supporter

    all the modules below?
    #yum -y install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel php-fpm php-intl php-imagick php-pspell wget

    Or would the problem be solved if I switch to new php?

    Enable the Remi repository to get newer PHP versions:
    #yum install
    #yum-config-manager --enable remi-php72

    We can install the needed packages with one single command:
    #yum -y install ntp httpd mod_ssl mariadb-server php php-mysql php-mbstring phpmyadmin

    To ensure that the server cannot be attacked through the HTTPOXY vulnerability, we will disable the HTTP_PROXY header in apache globally.
    Add the apache header rule at the end of the httpd.conf file:
    #echo "RequestHeader unset Proxy early" >> /etc/httpd/conf/httpd.conf

    And restart httpd to apply the configuration change.
    #service httpd restart
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    These are PHP modules, not apache modules and you must have installed them all before you installed ISPConfig as they are prerequisites that must be present before you start installing ISPConfig as described in the installation instructions.

    No. Your problem is not related to the PHP version.

Share This Page