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