How to use PHP to implement HTTPS login under the great god Ubuntu

Source: Internet
Author: User
Ask the Great God Ubuntu How to implement HTTPS login with PHP
I rookie a, just contact PHP, now I want to use PHP to implement HTTPS login in Ubuntu, do not know how to implement ...
I try to configure the Ubuntu under the Apache SSL, the results of many online posts are not effective, and there is no way to thoroughly explain the complete process of HTTPS login, although read some online posts but still foggy, do not understand, I hope that the great God generous help, if you can have an example, small is grateful ...

------Solution--------------------
Well, in fact, very naïve, just online posts are all stereotyped, simple to tell you the steps:

1. Generate the private key file PEM.
2, do your own CA sign the private key PEM, the contents of this PEM file changed, in addition to a private key segment, there is a CRT field, the CRT segment (this is called the certificate, there is a public key and digital signature (self-signed, Complete waste). In the CRT, delete the CRT in the PEM and the remaining private key segment exists. PEM, there are two files on the hand.

Now you can put the two files in the specified location according to the requirements of Apache,lighttpd,nginx and other servers.

In the future you access the server, the. CRT is passed to the browser, the browser pops up to ask you trust distrust, you say trust, so the browser trusts the waste digital signature, began to use the public key in the certificate to encrypt a variety of things to the server, the server with. PEM decryption, just such a process.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.