dshukertjr
dshukertjr

Reputation: 18573

Create https website with open SSL in PHP

I am currently learning PHP, and am making a web app with raw PHP for learning. Now I want to make my web app use https, and I found out about this thing called open SSL in PHP, but I could not find any examples of how exactly to use it to make my website https.

Is it possible to make my web app https with just using open SSL and not actually buying a certificate?

Upvotes: 1

Views: 2866

Answers (2)

Quentin
Quentin

Reputation: 943100

SSL is handled at the HTTP server level, not the PHP level. How you set up SSL depends on which HTTP server you use (e.g. Apache HTTPD).

You can set up SSL by generating your own certificate, but there will be no automatic chain of trust between browsers and you, so people will get a dire security warning. Let's Encrypt offer free certificates.

Upvotes: 3

Marty
Marty

Reputation: 39458

SSL is configured at the web server level (Apache, Nginx, etc). As for avoiding the purchase of a certificate, you can use Let's Encrypt to generate free certificates.

Upvotes: 2

Related Questions