Hi All,
We've successfully installed a Wildcard SSL. Everything works fine, except that when creating a subdomain, the https redirection doesn't work correctly :
http://test.domain.com => public_html/test/ just fine !
but https://test.domain.com => public_html/
So, the redirection asked in the cpanel subdomains manager doesn't work with HTTPS.
After searching a lot (I'm new to cpanel), I found the problem :
When creating a subdomain, the httpd.conf file is automatically modified with these lines :
but it forgets to add :Code:<VirtualHost 12.34.56.78:80> ServerName test.domain.com ServerAlias www.test.domain.com DocumentRoot /home/domain/public_html/test ServerAdmin webmaster@test.domain.com UseCanonicalName On CustomLog /usr/local/apache/domlogs/test.domain.com combined CustomLog /usr/local/apache/domlogs/test.domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ." ## User domain # Needed for Cpanel::ApacheConf <IfModule mod_suphp.c> suPHP_UserGroup domain domain </IfModule> <IfModule !mod_disable_suexec.c> SuexecUserGroup domain domain </IfModule> ScriptAlias /cgi-bin/ /home/domain/public_html/test/cgi-bin/ # To customize this VirtualHost use an include file at the following location # Include "/usr/local/apache/conf/userdata/std/2/domain/test.domain.com/*.conf" </VirtualHost>
So, I have to add it to WHM>Service Configuration>Apache Configuration>Include Editor>Post VirtualHost IncludeCode:<VirtualHost 12.34.56.78:443> ServerName test.domain.com ServerAlias www.test.domain.com DocumentRoot /home/domain/public_html/test ServerAdmin webmaster@test.domain.com UseCanonicalName On CustomLog /usr/local/apache/domlogs/test.domain.com combined CustomLog /usr/local/apache/domlogs/test.domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ." ## User domain # Needed for Cpanel::ApacheConf <IfModule mod_suphp.c> suPHP_UserGroup domain domain </IfModule> <IfModule !mod_disable_suexec.c> SuexecUserGroup domain domain </IfModule> ScriptAlias /cgi-bin/ /home/domain/public_html/test/cgi-bin/ SSLEngine on SSLCertificateFile /etc/ssl/certs/www.domain.com.crt SSLCertificateKeyFile /etc/ssl/private/www.domain.com.key SSLCACertificateFile /etc/ssl/certs/www.domain.com.cabundle CustomLog /usr/local/apache/domlogs/domain.com-ssl_log combined SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown <Directory "/home/domain/public_html/test/cgi-bin"> SSLOptions +StdEnvVars </Directory> </VirtualHost>
But doing this after each subdomain creation is not very handy...
How to change this ? I've seen many people on forums having problems with wildcard ssl domains in cpanel/whm. Maybe this should be natively set up ?
I saw that there are VirtualHost Templates, but then it will apply on all domains.



LinkBack URL
About LinkBacks
Reply With Quote




