1

My main config is Apache/Centos 7/WHM/Redis/OPCache/PHP7.1/MariaDb/PHP-fpm/Http2 and have optimized my server to a great degree. It's a 32GB dedicated HexaCore. I have worked really diligent to get the server optimized over the last few weeks and the state it currently is in, it's pretty dang fast. Now so you know I am not tooting my own horn, I will preface by saying this, I am the furthest away from a server admin as anyone can be, but I get by.

My question is: When serving up an local asset like CSS (/style.css) over HTTPS it takes about 2 seconds longer to load. A big part is the time of 800+ms for the style.css to load over https, ugh. So I am asking how can I use http2 to my advantage with Craft? I want to run in HTTPS all the time but not with the handshaking lag. Any suggestions or examples would be greatly appreciated.

In case you are tempted to say go Nginx, I would love too but unless you are volunteering, at this time I cannot put myself through an Nginx install.

Thanks!

2

So... just to be clear. This /style.css is a static asset, it's not sitting in the craft/templates folder, right?

Assuming that's the case, something is definitely wrong if https is taking 2 seconds to load it. Sounds like something with your server is misconfigured.

How are you measuring this, exactly?

| improve this answer | |
  • It's serving from inside the templates folder and all other assets like JS and extra CSS are in that folder, within the Craft folder. I am assuming I need to put that in public, that would make sense. Ok let me do that and see how it effects the speed. – Vin Sep 7 '17 at 16:44
  • That was it! I was serving my CSS and JS and some assets from /craft/templates not public_html/. That shaved 2 seconds off the time. Boom! – Vin Sep 7 '17 at 16:59
  • To answer your other question, using a few tools, but mainly gtmetrix. – Vin Sep 7 '17 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.