1. 阿里云买证书
2. /etc/httpd/conf httpd.conf
<VirtualHost *:80>
ServerAdmin denghuachengle@gmail.com
DocumentRoot "/var/www/xxx/xxx_crm/api"
ServerName crmapi.xxx.com
Redirect permanent / https://crmapi.xxx.com/
ErrorLog "logs/crmapi.xxx.com-error.log"
CustomLog "logs/crmapi.xxx.com-access.log" common
</VirtualHost>
3. /etc/httpd/conf.d ssl.conf
<VirtualHost *:443>
ServerAdmin denghuachengle@gmail.com
DocumentRoot "/var/www/xxx/xxx_service/xxx_filer"
ServerName file.xxx.com
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/xxx_com.key
SSLCertificateChainFile /etc/pki/tls/certs/intermediate.crt
ErrorLog "/var/www/xxx/logs/file.xxx.com.error.log"
CustomLog "/var/www/xxx/logs/file.xxx.com.access.log" combined
</VirtualHost>