Linux SSL certificate Configuration (apache)

Source: Internet
Author: User
Tags ssl certificate fully qualified domain name

1. If The. crt. key and. Ca-bundle files have been applied through a third party

2. Copy three files to any of the specified directories on a Linux server

3. Locate the Apache configuration you want to edit

The Apache master configuration file is often called httpd.conf or apache2.conf. common paths include /etc/httpd/or /etc/apache2/

SSL certificate configuration is typically located in a different <VirtualHost> chunk of a configuration file . The configuration file may be located in a directory such as /etc/httpd/vhosts.d/, /etc/httpd/sites/, Or in a file called Httpd-ssl.conf.

4. Locate the VirtualHost module for configuration

<virtualhost *:443>documentroot/var/www/html2servername Www.yourdomain.comSSLEngine onslcertificatefile/ path/to/your_domain_name.crtsslcertificatekeyfile/path/to/your_private.keysslcertificatechainfile/path/to/ Comodoca.crt</virtualhost>

5. Test Apache Config

Apachectl Configtest

6. Restart Apache

Systemctl Restart httpd

In a smooth situation, the basic is Ok.

But more often, it's not possible to reboot and encounter problems

Frequently Asked Questions are:

1. Invalid Command ' Sslengine ', perhaps misspelled or defined by a module not included in the server configuration

This means that SSL requires MOD_SSL module support to be installed (instruction Yum install mod_ssl, The general system will come with Openssl)

2.

AH00558:httpd:Could not reliably determine the server ' s fully qualified domain name, using 10.29.179.155. Set the ' ServerName ' directive globally to suppress this MES sage

This is because the httpd.conf configuration of the master Apache is missing ServerName localhost:80, find ServerName and add

3. How to be compatible with HTTP just want to keep the original vhost.conf things in the same time with the SSL article above the configuration content described above

4. Note that every time you modify the configuration, you need to restart Apache

Linux SSL certificate Configuration (apache)

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.