Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Apr 2008
    Location
    sanctum sanctorum
    Posts
    152

    Default Problem with custom templates for SSL host

    I am having a problem while customizing the template for httpd.conf generation for an SSL domain. Below are steps I am taking and the error message I am receiving.

    1-[OK] - Create a new account in WHM for subdomain.domain.com with dedicated IP, visit the default page at http://subdomain.domain.com and http://IP.

    2-[OK] - Customise a directive following instructions (say change the ServerAdmin email address).

    Code:
    perl -MYAML::Syck -e 'my $hr = YAML::Syck::LoadFile($ARGV[0]);$hr->{$ARGV[1]} = $ARGV[2];YAML::Syck::DumpFile($ARGV[0],$hr);' /var/cpanel/userdata/username/subdomain.domain.com custom_vhost_template_ap2 /path/to/custom_templates/username/vhost.local
    After this step /var/cpanel/userdata/username/subdomain.domain.com is created and includes as its first line custom_vhost_template_ap2: /path/to/custom_templates/username/vhost.local

    3-[OK] - Rebuild and check httpd.conf, the customization is applied correctly.

    4-[OK] - Create an SSL certificate for subdomain.domain.com and install it. Check SSL installation by visiting https://subdomain.domain.com and https://IP:443/

    5-[OK] - Make the same change as in step 2 but this time by copying ssl_vhost.default

    Code:
    perl -MYAML::Syck -e 'my $hr = YAML::Syck::LoadFile($ARGV[0]);$hr->{$ARGV[1]} = $ARGV[2];YAML::Syck::DumpFile($ARGV[0],$hr);' /var/cpanel/userdata/username/subdomain.domain.com custom_vhost_template_ap2 /path/to/custom_templates/username/ssl_vhost.local
    After this step /var/cpanel/userdata/username/subdomain.domain.com_SSL is created and the first line of /var/cpanel/userdata/username/subdomain.domain.com is changed to custom_vhost_template_ap2: /path/to/custom_templates/username/ssl_vhost.local

    6-[FAIL] - Rebuild httpd.conf

    Rebuild fails with the error

    SSLCertificateFile takes one argument, SSL Server Certificate file (`/path/to/file' - PEM or DER encoded)

    because tested httpd.conf does not have paths to .crt and .key files, though these appear correctly in /var/cpanel/userdata/username/subdomain.domain.com_SSL.

    Can you help? Thanks

  2. #2
    Member
    Join Date
    Apr 2008
    Location
    sanctum sanctorum
    Posts
    152

    Default

    After spending a couple of hours I am thinking, if one makes any customization to ssl_vhost.default, then paths for SSLCertificateFile and SSLCertificateKeyFile must be specified too in the customized ssl_vhost.local, or they are not found by build process, Can someone confirm if this is correct or not please? Thanks

  3. #3
    Member
    Join Date
    Apr 2006
    Posts
    12

    Default Re: Problem with custom templates for SSL host

    I had the same problem, and yes it appears that way.

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 05-30-2011, 04:23 AM
  2. Overwrite Virtual Host Templates
    By imagize in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-09-2009, 10:28 PM
  3. custom httpd templates
    By Bartuc in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 09-16-2008, 01:53 PM
  4. Help, SSL setup not working, only 1 SSL Host can be created
    By ayik in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-25-2004, 03:15 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube