httpd2.2 and http2.4 configuration HTTPS differences

Source: Internet
Author: User

On httpd2.4, you must specify permissions to documentroot the directory, whether it is on a central host or a virtual host.

On httpd2.2, you do not need to specify.

Configure the HTTPS service in the httpd2.4 series:

Note: If you configure the HTTPS service with httpd2.4, use <Directory></Directory> to specify permissions for the site document directory in the ssl.conf configuration file. You do not have to specify Virtualhostname in the/etc/httpd/conf/httpd.conf configuration file.

<directory "/web/vhosts/pma" > OPtions none allowoverride None Require all denied Require IP 172.16.0.0/255.255.0.0</directory>

First step: install mod_ssl the module first.

[email protected] ~]# Yum install mod_ssl

        Step two: in/etc/httpd/conf.d/ Directory to create the vhosts.conf configuration file, all of the virtual host's configuration files are written to the file.

<VirtualHost 172.16.125.128:80>              DocumentRoot  "/WEB/VHOSTS/PMA"               ServerName pma.lcs.com              ErrorLog /var/log/httpd/pmalog.err              CustomLog /var/log/httpd/pmalog.access common              <Directory  "/WEB/VHOSTS/PMA" >                           OPtions None                          Allowoverride  None                          Require all denied                          Require ip  172.16.0.0/255.255.0.0             </ Directory></virtualhost>

         Step three: Configuration file for SSL service ( /etc/httpd/conf.d/ssl.conf ) changes.

documentroot  "/WEB/VHOSTS/PMA"         <Directory  "/web/ VHOSTS/PMA ">                  OPtions None                  Allowoverride None                  Require all denied                  require ip 172.16.0.0/255.255.0.0         </Directory> ServerName pma.lcs.com:443     #指定https服务的服务器名称SSLCertificateFile  /etc/httpd/ssl/pma.lcs.com.crt   # Specify the certificate issued by the CA sslcertificatekeyfile /etc/httpd/ssl/httpd.key       #指定自己主机密钥的位置

Step three: Restart the httpd service.

[Email protected] httpd]# service httpd restart

To configure the HTTPS service on the httpd2.2 series:

Note: in the address and port of the Namevirtualhost must be specified in the/etc/httpd/conf/httpd.conf configuration file. You do not have to specify permissions for the site document directory.

        Let's say here isweb2.LCS.com To configure HTTPS.  

First step: first comment out the central host in the/etc/httpd/conf/httpd.conf configuration file, then add the following:

Namevirtualhost 172.16.125.125:80<virtualhost 172.16.125.125:80> ServerName web2.lcs.com Doc Umentroot "/WEB/VHOST/WEB2" Errorlog/var/log/httpd/www2.err customlog/var/log/httpd/www2.access Common</virtualhost>

Step Two: The SSL service configuration file ( /etc/httpd/conf.d/ssl.conf ) is modified.

DocumentRoot "/WEB/VHOST/WEB2" ServerName web2.lcs.comsslcertificatefile/etc/httpd/ssl/ Web2.lcs.com.crtsslcertificatekeyfile/etc/httpd/ssl/httpd.key

Step three: Restart the httpd service.



This article is from "angry, bird" blog, please make sure to keep this source http://angrybird.blog.51cto.com/10503706/1704376

httpd2.2 and http2.4 configuration HTTPS differences

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.