Notes on installing the certificate under Apache and Nginx

Source: Internet
Author: User

This afternoon study the certificate installation

The certificates are configured under Apache and Nginx respectively.

Record, hoping to help with the installation of the certificate of the children's shoes

Apache
Apply for DV certificate, fill out the application materials, do a domain name txt point, but also soon received the certificate of the Mail. Divided into three parts, I think three parts, one is
The first step is to turn on port 443 of the server firewall

Next start configuring

httpd.conf

LoadModule Socache_shmcb_module modules/mod_socache_shmcb.so

Open, remove the front #

Httpd-ssl.conf

<virtualhost _default_:443>

# General setup for the virtual host
DocumentRoot "/alidata/www/huaqimedia"
ServerName huaqimedia.com:443
Sslcertificatefile "/ALIDATA/WWW/HUAQIMEDIA/SSL/HUAQIMEDIA.CRT"
Sslcertificatekeyfile "/alidata/www/huaqimedia/ssl/huaqimedia.key"
Sslcertificatechainfile "/ALIDATA/WWW/HUAQIMEDIA/SSL/CA.CRT"
Save it, restart Apache.

Service httpd Restart

Complete

Access with https://

Nginx

After the application is completed

Configuration

server {
Listen 443;
server_name car.huaqimedia.com;
Access_log/alidata/log/nginx/access/car.huaqimedia.com.log;
Error_log/alidata/log/nginx/access/car.huaqimedia.com.error.log;
SSL on;
root HTML;
Index index.html index.htm;
Ssl_certificate/path/cert/214596358230204.pem;
Ssl_certificate_key/path/cert/214596358230204.key;
Ssl_session_timeout 5m;
Ssl_ciphers ecdhe-rsa-aes128-gcm-sha256:ecdhe:ecdh:aes:high:! null:!anull:! md5:! Adh:! RC4;
Ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Ssl_prefer_server_ciphers on;
Location/{
root/alidata/www/car.huaqimedia.com/;
Index index.html index.htm index.php;
}

if (!-e $request _filename) {
Rewrite ^ (. *) \.php (. *) $ $1.php?s=$2 last;
Break
}

Location ~ \.php$ {
root HTML;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename/alidata/www/car.huaqimedia.com/$fastcgi _script_name;
Include Fastcgi_params;
}
}

Restart Service Nginx Restart
Complete

Notes on installing the certificate under Apache and Nginx

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.