logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> How-to's & Documentation & Tips View previous topic :: View next topic
Reply to topic   Topic: mod_http2 :: HowTo & Info & Tips
Author
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Sat 10 Oct '15 10:29    Post subject: mod_http2 :: HowTo & Info & Tips Reply with quote

Apache 2.4.17 contains mod_http2 (formely mod_h2) and other necessary changes needed for mod_http2. Mod_http2 is contributed by Stefan Eissing (greenbytes GmbH), a great job.

A short intro HTTP/2 is at https://http2.akamai.com/ and https://en.wikipedia.org/wiki/HTTP/2

H2 requires OpenSSL 1.0.2 and it is advised to use the Modern compatibility ciphers at : https://www.apachelounge.com/viewtopic.php?p=38292 They give with SSLLabs a good score and in Chrome "using modern cipher suite".

The h2 protocol (http/2 over TLS/1.2) is the only protocol that the current major browsers support, like Chrome, Firefox, IOS9, Win10. The h2c (http/2 over http and no browser currently supports it) is a non-encrypted protocol that mod_http2 also supports and maybe the browsers will chill out eventually and support it. After all, not everything needs encryption and therefor a waste of resources on both ends of a connection.

There are two new core directives available, Protocols and ProtocolsHonorOrder. In the case of mod_h2 for h2:
Code:
LoadModule http2_module modules/mod_http2.so
<IfModule http2_module>
    ProtocolsHonorOrder On
    Protocols h2 http/1.1
</IfModule>
 

For more info and configuration, see: http://icing.github.io/mod_h2/howto.html and https://httpd.apache.org/docs/2.4/mod/mod_http2.html


To see if your browser is using HTTP/2, Chrome has a nice extension HTTP/2 and SPDY indicator, with Windows 10 you can see it with F12 / Network, and Firefox has HTTP/2 and SPDY indicator

See also for Curl with http/2: https://www.apachelounge.com/viewtopic.php?t=6784

Please post issues with mod_http2 in the Apache forum.


Last edited by Steffen on Mon 12 Oct '15 21:59; edited 1 time in total
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Mon 12 Oct '15 21:58    Post subject: http/2 requests are still showed as http/1.1. Reply with quote

In access log and mod_status http/2 requests are still showed as http/1.1.

If you want see HTTP/2 in the log:
add %H to the end of your LogFormat string where it will not break any log readers.

Is going to be fixed in the next release (already in trunk).


Last edited by Steffen on Tue 13 Oct '15 13:50; edited 1 time in total
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Tue 13 Oct '15 12:35    Post subject: Reply with quote

Be sure that :

<IfModule http2_module>
ProtocolsHonorOrder On
Protocols h2 h2c http/1.1
</IfModule>

is placed after

LoadModule http2_module modules/mod_http2.so

I was trying h2c and the IfModule was only picked up when it is after the Loadmodule line.
Back to top
icing



Joined: 22 Sep 2015
Posts: 41
Location: Münster, Germany

PostPosted: Tue 13 Oct '15 13:23    Post subject: Reply with quote

No need to place an 'IfModule' around it:

ProtocolsHonorOrder On
Protocols h2 h2c http/1.1

are both core directives and the protocols named are just strings. You could as well write:

Protocols ugga ftp agga h2 websocket spdy/3.1 http/1.1

without needing to make sure that all those modules have been loaded. Unknown/Unimplemented protocol strings will just have no effect.
Back to top
lunter



Joined: 12 May 2011
Posts: 10

PostPosted: Thu 15 Oct '15 10:42    Post subject: Reply with quote

No need to place 'ProtocolsHonorOrder On' because it is default on.

http://httpd.apache.org/docs/2.4/mod/core.html#protocolshonororder
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1264
Location: Amsterdam, NL, EU

PostPosted: Sat 17 Oct '15 23:47    Post subject: Reply with quote

Howto for people that are using Directadmin (*nix):
https://forum.directadmin.com/showthread.php?t=52133&p=267972#post267972
Back to top
nickgearls



Joined: 07 Jul 2016
Posts: 9

PostPosted: Wed 23 Aug '17 16:20    Post subject: Re: mod_http2 :: HowTo & Info & Tips Reply with quote

Any info on how to compile it with Visual Studio?
Back to top


Reply to topic   Topic: mod_http2 :: HowTo & Info & Tips View previous topic :: View next topic
Post new topic   Forum Index -> How-to's & Documentation & Tips