Easyapache 4 with wildcard SSL subdomain vhosts

_jman

Active Member
Jan 17, 2007
43
4
158
Hi, just wondering where to put virtual ssl subdomain vhost conf files in easyapache 4.

This is for a wildcard cert. The main domain and non-ssl subdomains render fine, but ssl subdomains keep redirecting to defaultwebpage.cgi.

Server info:
/etc/redhat-release:CentOS Linux release 7.1.1503 (Core)
/usr/local/cpanel/version:11.52.0.22
/var/cpanel/envtype:kvm
CPANEL=release
Server version: Apache/2.4.16 (cPanel)
Server built: Oct 2 2015 14:55:26
PHP 5.4.45 (cli) (built: Oct 5 2015 18:11:32)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
mysql Ver 14.14 Distrib 5.5.46, for Linux (x86_64) using readline 5.1

Previously, one would make up .conf files for each subdomain and drop them in /usr/local/apache/conf/userdata/ssl/2_4/USER/DOMAIN/*.conf

However, the userdata folder does not seems to have been replicated to the new version of easyapache.

First, tried copying the main domain's SSL virtual host section from the main httpd.conf, adjusting paths for the subdomain, and dropping that directly into conf.d

As the README in conf.d says files are read alphabetically, used vhost.DOMAIN.conf as the filename so it'd come in after the other files already present.

Unfortunately, doing that make Apache cranky, and it wouldn't start.

Then tried putting it into /etc/apache2/conf.d/userdata/ssl/2_4/USER/DOMAIN/SUBDOMAIN.conf

Apache started, non-ssl renders OK, ssl got defaultwebpage.cgi

Also tried /etc/apache2/conf.d/userdata/ssl/2_4/USER/DOMAIN/SUBDOMAIN/subdomain.conf - still no joy.

Anyone know how to get an ssl subdomain working under easyapache 4?

Thanks!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
This is for a wildcard cert. The main domain and non-ssl subdomains render fine, but ssl subdomains keep redirecting to defaultwebpage.cgi.
Hello :)

The following document provides the path reorganization details:

Path Reorganization - EasyApache 4 - cPanel Documentation

As far as manually editing the Apache configuration file, there's a document here you can reference:

Configure PHP-FPM with User Pools for EasyApache 4 - cPanel Knowledge Base - cPanel Documentation

It's for an unrelated customization, but if you start at "Step 6" you will see an example of how to make the change.

The following document also helps answer some common questions about wildcard SSL certificates:

SSL FAQ and Troubleshooting - Documentation - cPanel Documentation

Thank you.