Categories
Windows

Moving my WordPress to HTTPS for supporting HTTP/2-#3.

同一記事の日本語版

   Continued from this post. As I finished preparing for supporting HTTP/2, I re-edited my httpd.conf and httpd-ssl.conf.
 
   On the httpd.conf, I un-commented the next line.
     LoadModule http2_module modules/mod_http2.so
   On the httpd-ssl.conf, I added the next line just after <VirtualHost o6asan.com:443>.
     Protocols h2 http/1.1
   h2 is HTTP/2 with TLS and h2c is HTTP/2 without TLS. I don’t use h2c on the server.
 
   Reboot Apache to enable Http/2. That’s it.

   It was on Oct.19. Now my Web server supports HTTP/2. If your browser is using HTTP/2, you can see images below by Chrome’s HTTP/2 and SPDY indicator or Firefox’s SPDY indicator, or by Microsoft Edge or IE11 with F12 on Windows10.

Chrome indicator
Chrome indicator
Firefox indicator
Firefox indicator
Edge protocol
Edge protocol
IE11 protocol
IE11 protocol

   One day later, I inserted a Header Directive just after SSLEngine on on the httpd-ssl.conf. This is for HSTS.  63072000 = 6o x 60 x 24 x 365 x 2, i.e. 2 years, if 1 year is set 365 days.
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
Header always set Strict-Transport-Security "max-age=15768000; includeSubdomains; preload"
   I changed the value by the suggestion of Mozilla SSL Configuration Generator.
 
   Two more days later, I submitted my URL to Domain to include in HSTS list and had the following reply.

Domain to include in HSTS list
Domain to include in HSTS list

   Now you can see o6asan.com on the latest list. I first found it on the list was November 3.
 
   By the way, by Firefox I saved images about Apache without HTTP/2 and with HTTP/2 to compare their loading speed. The following table is the results.

Before HTTP/2 by FirefoxBefore HTTP/2 by FirefoxBefore HTTP/2 by Firefox After HTTP/2 by Firefox After HTTP/2 by Firefox After HTTP/2 by Firefox

   I don’t know why, but it looks like telling Apache without HTTP/2 is faster. Gee!
   I thought that WordPress includes a lot of nuisances ha-ha, and a production site has other accesses during tests. So I created a Web server for the test in CF-J10 and made this HTML file. The test sever has only Apache with TLs and no logging except errors’.

Without HTTP2 by Firefox on Test ServerWithout HTTP2 by Firefox on Test ServerWithout HTTP2 by Firefox on Test Server With HTTP2 by Firefox on Test ServerWith HTTP2 by Firefox on Test Server With HTTP2 by Firefox on Test Server

   I think the differences are subtle. As I recall, I read this page before. Hmm. At this point, I give it up. I should learn more about HTTP/2.

Leave a Reply

Your email address will not be published. Required fields are marked *