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: Rewriting from non-www to www over HTTPS takes too long
Author
graphicsxp



Joined: 18 Jan 2017
Posts: 1

PostPosted: Wed 18 Jan '17 20:59    Post subject: Rewriting from non-www to www over HTTPS takes too long Reply with quote

Hello,

I am migrating my website from HTTP to HTTPS. I'm almost done but I have one big issue remaining. When redirecting from non-www to www over HTTPS, it takes about 2 seconds !


Redirecting from non-www to www over HTTP is instantaneous. So why does it take so long over HTTPS ?

Code:

    SSLStaplingCache shmcb:/tmp/stapling_cache(128000)

    <VirtualHost my.ip.address:80>
       ServerName pretty-story.com
       Redirect permanent / https://www.pretty-story.com/
    </VirtualHost>


    <IfModule mod_ssl.c>

     <VirtualHost my.ip.address:443>
       ServerName www.pretty-story.com
       DocumentRoot /var/www/pretty-story
       DirectoryIndex index.php

       #Enable HTTP2 protocol
       Protocols h2 http/1.1

       #Guarantee HTTPS for 1 Year including Sub Domains
       Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"


       <Directory "/var/www/pretty-story">
         AllowOverride All
         Allow from All
       </Directory>

         #   SSL Engine Switch:
         #   Enable/Disable SSL for this virtual host.
       SSLEngine on

   SSLCertificateKeyFile path-to-file
   SSLCertificateFile path-to-file
   SSLCertificateChainFile path-to-file

   SSLUseStapling on

</VirtualHost>


</IfModule>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Thu 26 Jan '17 14:03    Post subject: Reply with quote

Get it faster by disable the stapling

SSLUseStapling off

and use sessions tickets with

SSLSessionCache
Back to top


Reply to topic   Topic: Rewriting from non-www to www over HTTPS takes too long View previous topic :: View next topic
Post new topic   Forum Index -> Apache