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 -> Apache View previous topic :: View next topic
Reply to topic   Topic: Setting mod_h2 to work on http
Author
roysitumorang



Joined: 13 Jul 2015
Posts: 14
Location: Indonesia, Sidikalang

PostPosted: Tue 22 Sep '15 9:07    Post subject: Setting mod_h2 to work on http Reply with quote

I followed the steps on https://www.apachelounge.com/viewtopic.php?p=31684, now mod_h2 works but only on https. Is there any additional setting to make it work on http?
Back to top
Steffen
Moderator


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

PostPosted: Tue 22 Sep '15 12:28    Post subject: Reply with quote

mod_h2 supports h2c (http/2 over http), browsers like Chrome, Firefox, IOS9, Win10 do not support it at the moment.

While some browsers' spokespersons have stated they will not implement h2c, the Internet Explorer team has expressed that they will, and curl already supports this. 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.

See for a complete list: https://github.com/http2/http2-spec/wiki/Implementations
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 219
Location: Denver, CO USA

PostPosted: Tue 22 Sep '15 20:12    Post subject: Reply with quote

Mod_h2 does work (or at least loads) without mod_ssl, meaning you can run it on Apache without using HTTPS / having an SSL cert. However, in the error log, it does state that mod_h2 needs mod_ssl.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 22 Sep '15 20:48    Post subject: Reply with quote

[Tue Sep 22 11:19:45.866600 2015] [h2:warn] [pid 8004:tid 488] AH02951: mod_ssl does not seem to be enabled

What do you know. This check should have a caveat that if h2 is configured as one of the protocols. h2c has no need for mod_ssl.

I'd imagine it's there because no browser actually supported h2c at the time, still doesn't. Once one breaks from this rigid thinking, the others should soon follow.

Oh, and it does work without mod_ssl
Code:
C:\Apache24h2\bin>curl --http2 -i http://localhost
HTTP/1.1 101 Switching Protocols
Upgrade: h2c
Connection: Upgrade

HTTP/2.0 200
date:Tue, 22 Sep 2015 18:22:23 GMT
server:Apache/2.4.17-dev (Win32)
last-modified:Tue, 08 Sep 2015 18:58:01 GMT
etag:"88-51f40f1f97d00"
accept-ranges:bytes
content-length:136
content-type:text/html

<html><body>
<h1>It works!</h1>


With h2 this is now correct and says HTTP/2, with h2c it's wrong.
$ENV{'SERVER_PROTOCOL'} = HTTP/1.1

So it got partially fixed.


Edit: Testing methodology was incorrect (was on auto-pilot) so the above is grayed out statement is itself incorrect.


Last edited by glsmith on Tue 22 Sep '15 21:42; edited 2 times in total
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 219
Location: Denver, CO USA

PostPosted: Tue 22 Sep '15 21:12    Post subject: Reply with quote

Gregg:

I was not disputing that mod_h2 will run without mod_ssl. I was merely pointing out that it generates the nag message in the error log.

Also, Http2 / Spdy checking addons for Chrome or Firefox will not detect without the HTTPS protocol running on your Web server. That is what I have discovered.

-S
Back to top


Reply to topic   Topic: Setting mod_h2 to work on http View previous topic :: View next topic
Post new topic   Forum Index -> Apache