PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 4, 2022

[FIXED] I Installed a new SSL and now only half of the site is secured?

 February 04, 2022     apache, https, lamp, ssl, wordpress     No comments   

Issue

Note: I checked similar posts but unfortunately I had no luck using their solutions

Take for example this post, SSL only working on half of site where the problem was that he only had the https:// on half of the site, but the problem I'm facing is a bit different since I already have https everywhere yet my site is still half secure and half insecure in its own weird way.


Background: I just installed a new SSL certificate on my website running on a Lamp Server - Ubuntu 18.04 LTS version inside a Google Cloud MicroServer.


The Problem: After that, Both the wp-admin and the WordPress site itself were showing as insecure but without the red notice (unlike self-signed), So I went back to my apache2 configuration and changed the VirtualHost *:80 port to *:443 as well as the ServerName myWebsite.com:443,

I did this on both of the .conf files (SSL and the default) because I figured why use port 80?

/var/apache2/sites-available/000-default.conf

/var/apache2/sites-available/default-ssl.conf

(I remembered now that there's also the Listen command somewhere in the files that I forget and left on Listen to port 80 that could be important)

And only after I did that I got this weird new problem where only the wp-admin area is Secured while the homepage itself is Info or Insecure *(Google terms) - Unlike before I did that change where both the admin panel and the homepage was Insecure *

so I was finally happy to see that green secure icon but was sad to find out that it's only valid on the admin panel and not on the homepage which is very weird right?


Please take a look at the picture to better understand this weird problem:

enter image description here

I will really appreciate any help on the subject.

Thanks upfront.


Solution

In an .htaccess file you can add this:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


Answered By - Tim Strawbridge
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing