I have created a self signed apache certificate for my localhost but I'm getting red https ( Not Secure connection ).
How would I turn it into green https.
You are using a self-signed certificate, then the browser by default will not accept as a valid one, because the certificate isn't trusted by an certificate authority;
Moreover, you can deploy one free from Let's Encrypt, e.g;
Here is a link from Certbot - It is an easy way to deploy on your server.