Web security: HTTPS

Source: Internet
Author: User

E1:
Build Zoobar website
Turn on Apache services and MySQL Services
Service Apache2 Start
Service MySQL Start

Establish database and table mysql->
Create Database Myzoo;
Use Myzoo;
CREATE TABLE person (PersonID int primary key auto_increment, Password varchar (+), Salt varchar (+), Username varchar ( (+), Token varchar (+), Zoobars int default, profile varchar (5000));

In the Myzoo includes folder, modify the database file to assign the user name, password, and database name to the corresponding variable

Comment/etc/apache2/apache2.conf

<directory/> #Require All denied</directory>


Modify/etc/apache2/sites-available/000-default.conf
<virtualhost 127.0.0.1:80>
ServerName www.myzoo.com
Documentroot/var/www/myzoo
</vitualHost>

Modify/etc/hosts
127.0.0.1 www.myzoo.com

Restart Apache
Service Apache2 Restart

E2:
Apache Multi-site configuration

Create www.attack.com Web site

Create/etc/apache2/site-available/attack.conf

<virtualhost 127.0.0.3:80> ServerName www.attack.com documentroot/var/www/attack<virtualhost>

Create/etc/apache2/site-enable/attack.conf
<virtualhost 127.0.0.3:80> ServerName www.attack.com documentroot/var/www/attack<virtualhost>

Modify/etc/hosts

127.0.0.3 www.myzoo.com

Restart Apache
Service Apache2 Restart

E3:
HTTPS Web site Configuration

Create a certificate store
Myca is used to store CA certificates, certificate databases, generated certificates, keys, and requests
Signedcerts: Save copy of the signing certificate
Private: Contains the private key
CACONFIG.CNF is the CA configuration file

Generate CA root Certificates and keys

Configuring the server configuration file myservice.cnf

Generate server certificates and keys
Tempkey Temporary private key
Tempreq Certificate Request

Generate Server Encrypted private key

The CA private key signs the server certificate

Delete temporary private keys and temporary certificates
SERVER_CRT.PEM: Service Signing certificate
SERVER_KEY.PEM: Server key

Web security: HTTPS

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.