LAMP CSS broken after installing SSL

September 16, 2018 427 views
LAMP Stack Ubuntu 18.04

Hi,

I have installed on a droplet LAMP (one click install) and after that, i have uploaded my website files. Everything went smooth but i decided to install Let's Encrypt SSL and now my site is working but without CSS.

I mean it loads like it doesn't have CSS at all (tried multiple browsers) and i don't know where to look and what to change.

PS: when i installed the SSL i chose this option:

"2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration."

Thank You for your help.

-Albert

1 Answer

Unless your CSS is inline, which isn't recommended, it means that your CSS is being loaded from a separate file that you have linked to.

You want to ensure that this file is available via HTTPS at the expected URL as well, as all of the requests will be automatically directed to HTTPS instead of HTTP.

Most likely the way you were loading your CSS was through HTTP, and HTTPS isn't setup which is why the request is failing and your CSS isn't loading and displaying as expected.

Have another answer? Share your knowledge.