How can I use php for https login in ubuntu?

Source: Internet
Author: User
Ask me how to use php to achieve https login in ubuntu. I just got in touch with PHP. now I want to use PHP to achieve https login under ubuntu. I don't know how to achieve this... I tried apache in ubuntu to configure ssl. as a result, many posts on the Internet did not work. Is there any thorough explanation of the complete https login process, although I have read some posts on the Internet, I still want to ask how to use php to achieve https login under ubuntu.
I am a newbie. I just got in touch with PHP. now I want to use PHP for https login under ubuntu. I don't know how to implement it...
I tried to configure ssl for apache in ubuntu. as a result, many posts on the Internet did not work. Is there any thorough explanation of the complete https logon process? although I have read some posts on the Internet, I am still confused about it, I don't understand it. I hope you can help me with your generosity. if you have an example, I am even more grateful...

------ Solution --------------------
Actually, it's very naive, but the posts on the Internet are all the same. let's simply tell you the steps:

1. Generate the private key file pem.
2. run the CA command to sign the private key pem. the content of this pem file has changed. in addition to the private key segment, there is also a CRT field, and the CRT segment (this is called the certificate, there is a public key and a digital signature (self-signed, completely waste. in crt, delete the CRT in pem and the remaining private key segment exists. pem. There are two files in your hand.

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

You will access the server in the future ,. the crt is transmitted to the browser, and the browser pops up to ask whether you trust or not. if you say trust, the browser then trusts the waste digital signature, start to use the public key in the certificate to encrypt everything and send it to the server. pem decryption, that's the 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.