search
HomeCommon Problemhttp request to https request

http request to https request

Jul 22, 2019 am 10:04 AM

http request to https request

1. First, log in to the Alibaba Cloud official website, find the Cloud Shield Certificate Service, select the required SSL certificate according to your needs and purchase it.

http request to https request

#2. After purchasing, it will pass the review in about a few minutes, and you can enter the SSL certificate management console to check the certificate status.

http request to https request

#3. Click Download and select the type of certificate to download according to your server environment. I am using Apache, so I downloaded the second one.

http request to https request

#4. After downloading, unzip the file and upload it to the apache installation directory, and create a new ssl folder under /ect/apache2 (the folder name can be customized, which will be updated later) Use the path to this folder (remember to replace it yourself) and upload all the decompressed files into it.

http request to https request

5. Apache has its own ssl module by default. If not, please install it yourself~ Under /etc/apache2/mods-available, open the ssl.load file, Remove the # sign before the sentence LoadModulessl_module/usr/lib/apache2/modules/mod_ssl.so.

http request to https request

In the same directory, open the ssl.conf file and modify the following content:

# 添加 SSL 协议支持协议,去掉不安全的协议
SSLProtocol all -SSLv2 -SSLv3
# 修改加密套件如下
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on

6. Open default under /etc/apache2/sites-available -ssl.conf file, modify the following content (replace the file path with your previously customized path):

SSLCertificateFile /etc/apache2/ssl/1533868915008.pem
SSLCertificateKeyFile /etc/apache2/ssl/1533868915008.key
SSLCertificateChainFile /etc/apache2/ssl/public.pem

http request to https request

#7. Automatically check whether the configuration file is correct: apachectl configtest , if there is an error, check the detailed command: apachectl configtest, and then restart Apache: service apache2 restart.

Now, add https in front of your domain name to access it

Finally, implement HTTP to automatically jump to HTTPS
Open 000 under /etc/apache2/sites-available -default.conf, add the following configuration:

# 自动将80端口的访问,重定向到https的域名
    Redirect permanent / https://xxx.com

Restart Apache: service apache2 restart.

The above is the detailed content of http request to https request. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.