http2 does not work

bibiugly

Verified User
Joined
Apr 9, 2019
Messages
75
Location
Vietnam
Sorry for my English.
This is my config, but the website didn't load HTTP2, I installed full SSL.


Code:
#PHP Settings
php1_release=5.6
php1_mode=php-fpm
php2_release=7.2
php2_mode=php-fpm
secure_php=no
php_ini=no
php_timezone=Asia/Ho_Chi_Minh
php_ini_type=production
x_mail_header=yes

#MySQL Settings
mysql=5.6
mariadb=10.3
mysql_inst=mariadb
mysql_backup=yes
mysql_backup_gzip=no
#mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
#mysql_backup_dir=/home/admin/mysql_backups
mysql_backup_dir=/home/admin/admin_backups/mysql_backups
mysql_force_compile=no

#WEB Server Settings
webserver=apache
http_methods=GET:HEAD:POST:PUT
litespeed_serialno=trial
modsecurity=yes
modsecurity_ruleset=no
apache_ver=2.4
apache_mpm=auto
mod_ruid2=no
userdir_access=yes
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=tqtecom105.65.com
redirect_host_https=no

#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_ver=4
squirrelmail=no
roundcube=yes
webapps_inbox_prefix=no

#ClamAV-related Settings
clamav=no
clamav_exim=yes
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=no
suhosin_php_uploadscan=no

#Mail Settings
exim=yes
eximconf=yes
eximconf_release=4.5
blockcracking=yes
easy_spam_fighter=yes
spamd=rspamd
sa_update=daily
dovecot=yes
dovecot_conf=yes
pigeonhole=no

#FTP Settings
ftpd=pureftpd

#Statistics Settings
awstats=no
webalizer=yes

#CustomBuild Settings
custombuild=2.0
autover=no
bold=yes
clean=yes
cleanapache=yes
clean_old_tarballs=yes
clean_old_webapps=yes
downloadserver=files12.directadmin.com

#Cronjob Settings
cron=no
cron_frequency=weekly
[email protected]
notifications=yes
da_autoupdate=no
updates=no
webapps_updates=yes

#CloudLinux Settings
cloudlinux=no
cloudlinux_beta=no
cagefs=no

#Advanced Settings
autoconf=yes
automake=yes
libtool=yes
curl=yes
new_pcre=no

php3_release=7.3
php4_release=7.4
php3_mode=php-fpm
php4_mode=php-fpm
maildir_compress=no
mail_compress=no
custombuild_plugin=yes
phpmyadmin_public=yes
ssl_configuration=intermediate
unit=no

httpd -V

Code:
Server version: Apache/2.4.41 (Unix)
Server built:   Dec  1 2019 00:37:40
Server's Module Magic Number: 20120211:88
Server loaded:  APR 1.6.5, APR-UTIL 1.6.1
Compiled using: APR 1.6.5, APR-UTIL 1.6.1
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/httpd"
 -D HAVE_SYSTEMD
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/var/logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Many thanks for your help.
 
We would need a lot more information than this. What exactly are you seeing when you say it doesn't work? Do you see any errors in the apache log files?
 
Below are the closest error logs I see.

Code:
[root@ ~]# tailf /var/log/httpd/error_log
[Mon Mar 23 12:48:26.177920 2020] [mpm_prefork:notice] [pid 60051] AH00163: Apache/2.4.41 (Unix) OpenSSL/1.0.2k-fips configured -- resuming normal operations
[Mon Mar 23 12:48:26.177953 2020] [core:notice] [pid 60051] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Mar 23 12:49:01.823874 2020] [mpm_prefork:notice] [pid 60051] AH00171: Graceful restart requested, doing restart
[Mon Mar 23 12:49:02.149462 2020] [ssl:warn] [pid 60051] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Mar 23 12:49:02.150864 2020] [lbmethod_heartbeat:notice] [pid 60051] AH02282: No slotmem from mod_heartmonitor
[Mon Mar 23 12:49:02.151610 2020] [mpm_prefork:notice] [pid 60051] AH00163: Apache/2.4.41 (Unix) OpenSSL/1.0.2k-fips configured -- resuming normal operations
[Mon Mar 23 12:49:02.151626 2020] [core:notice] [pid 60051] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Mar 23 16:27:38.222319 2020] [proxy_fcgi:error] [pid 63792] [client 46.105.99.163:65408] AH01071: Got error 'Primary script unknown\n', referer: http://www.google.com.hk
[Mon Mar 23 16:29:49.912504 2020] [proxy_fcgi:error] [pid 65415] [client 46.105.99.163:54674] AH01071: Got error 'Primary script unknown\n', referer: http://www.google.com.hk
[Mon Mar 23 20:40:32.712196 2020] [proxy_fcgi:error] [pid 12647] [client 109.234.161.21:60632] AH01071: Got error 'Primary script unknown\n'
 
I think you need to compile http2 in Apache
Code:
      "--enable-http2" \
      "--with-ssl=/usr/local/lib_http2" \
But I'm not sure.

@smtalk is best to answer this
 
According to the latest custombuild, Apache should ONLY be using prefork MPM if mod_php was selected. According to what I see you don't use mod_php so it should have defaulted to event. You can work around this by editing /usr/local/directadmin/apache/options.conf and modifying apache_mpm=auto to be apache_mpm=event
 
According to the latest custombuild, Apache should ONLY be using prefork MPM if mod_php was selected. According to what I see you don't use mod_php so it should have defaulted to event. You can work around this by editing /usr/local/directadmin/apache/options.conf and modifying apache_mpm=auto to be apache_mpm=event
Thank you. Everything worked for me.

Code:
# cd /usr/local/directadmin/custombuild/
# ./build set apache_mpm event
Changed apache_mpm option from auto to event
# ./build apache
 
Thank you. Everything worked for me.

Code:
# cd /usr/local/directadmin/custombuild/
# ./build set apache_mpm event
Changed apache_mpm option from auto to event
# ./build apache
it not work for me . Version 1.645 hic
 
Back
Top