CodeIgniter Forums
Enabling SSL for a Login Form - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Enabling SSL for a Login Form (/showthread.php?tid=68510)



Enabling SSL for a Login Form - RedRepublic01 - 07-19-2017

Hey guys, (newbie here)

I was wondering if anybody had experience with enabling SSL protection for a login page in CI 3? I've already enabled Session, CSRF, and XSS protection in my config file but I'm getting "Connection is not secure" warnings every time I access the login form of my website.

Sure hope somebody can help me with this.

Thanks in advance! Big Grin


RE: Enabling SSL for a Login Form - skunkbad - 07-19-2017

Depends on your server, but you need to install a security certificate to be able to successfully make TLS (SSL) type requests. If you're on a hosting account that uses cPanel (or maybe even if your not), you should look in the control panel for a utility that installs a free cert through "LetsEncrypt". There are other ways to install a free cert, but you don't want to use a self signed cert, or you'll have other errors. Once the cert is installed correctly, you just adjust the links (and in your case the form action) so that the URL scheme is HTTPS.

This is confusing for new devs, because you think you have to do more than you really have to do. You just install a cert, and you can then access URLs via https://....


RE: Enabling SSL for a Login Form - RedRepublic01 - 07-19-2017

(07-19-2017, 07:13 PM)skunkbad Wrote: Depends on your server, but you need to install a security certificate to be able to successfully make TLS (SSL) type requests. If you're on a hosting account that uses cPanel (or maybe even if your not), you should look in the control panel for a utility that installs a free cert through "LetsEncrypt". There are other ways to install a free cert, but you don't want to use a self signed cert, or you'll have other errors. Once the cert is installed correctly, you just adjust the links (and in your case the form action) so that the URL scheme is HTTPS.

This is confusing for new devs, because you think you have to do more than you really have to do. You just install a cert, and you can then access URLs via https://....

I see now, I never knew it was that simple, haha thanks so much!