Last active
February 14, 2016 20:09
-
-
Save allella/b2de20d3df17a867f3c3 to your computer and use it in GitHub Desktop.
Updating Apache to Named Virtual Hosts For Multiple SSL Certificates on the Same 1 IP Address
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BE VERY CAREFUL IF YOU CHANGE YOUR Apache CONFIGURATION | |
# Backup your configuration before changing and run an error check before applying changes | |
# If you have 1 IP address for each SSL certificate then you probably don't need to do any of this | |
# If you have more than 1 site per IP address then this worked for me. | |
# It requires Apache with with SNI, which should already be part of Apache since it's been around for many years | |
# For more info see https://www.digicert.com/ssl-support/apache-multiple-ssl-certificates-using-sni.htm | |
# I changed to named Virtual Hosts https://httpd.apache.org/docs/2.2/en/vhosts/name-based.html , like this | |
vi /etc/httpd/conf/httpd.conf | |
# then change the port 443 NameVirtualHost to | |
NameVirtualHost *:443 | |
# and for all https (port 443) virtual hosts sharing the same IP address change the opening tag | |
# of the part 443 vhost to the following | |
<VirtualHost *:443> | |
# Run an error check, which is usually like | |
/usr/sbin/apachectl configtest | |
# then restart Apache (for CentOS 6) | |
/etc/init.d/httpd reload | |
# CentOS 7 restart | |
systemctl reload httpd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment