`After enabling mod_http2 in http/1.1 headers?
V
V
Viktor Yanyshev2018-01-25 13:13:08
Apache HTTP Server
Viktor Yanyshev, 2018-01-25 13:13:08

After enabling mod_http2 in http/1.1 headers?

Why after enabling mod_http2 in http/1.1 headers?

The order of my actions:
1. a2enmod ssl
2. certbot --manual [domain] (Let`s crypt SSL)
3. Setting up the host config:

config

<VirtualHost *:80>
  ServerName lalal.domain
  ServerAlias www.lalal.domain
  DocumentRoot /home/user/lalal.domain
    
  RedirectMatch permanent ^/(.*) https://lalal.domain/$1
</VirtualHost>

<VirtualHost *:443>
  ServerName lalal.domain
  ServerAlias www.lalal.domain

  # For https
  Protocols h2 http/1.1

  DocumentRoot /home/user/lalal.domain
  DirectoryIndex index.html index.php

  LogLevel info ssl:error

  ErrorLog ${APACHE_LOG_DIR}/lalal.domain-error.log
  CustomLog ${APACHE_LOG_DIR}/lalal.domain-access.log combined

  SSLEngine on
  SSLCertificateFile /etc/letsencrypt/live/lalal.domain/cert.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/lalal.domain/privkey.pem
  
  <Directory /home/user/lalal.domain>
    		Options -Indexes +FollowSymLinks +MultiViews
    		AllowOverride all
    Require all granted
  </Directory>

</VirtualHost>


4. add-apt-repository -y ppa:ondrej/apache2
5. Update Apache to the latest version to install mod_http2: apt-get --only-upgrade install apache2 -y
6. a2enmod http2
7. systemctl restart apache2

As a result, I get answer:
ovTqM61LSPGnoTibn1mVyA.png

Apache Version
Server version: Apache/2.4.29 (Ubuntu)
Server built:   2018-01-14T11:23:59


Apache Modules
apachectl -t -D DUMP_MODULES | grep http
 http_module (static)
 http2_module (shared)


apache.conf
tail ../apache2.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf


# For https
Protocols h2 http/1.1
# For http
Protocols h2c http/1.1

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question