Koozali.org: home of the SME Server

How to use ssl-certificates with no host name?

Offline holck

  • ****
  • 317
  • +1/-0
How to use ssl-certificates with no host name?
« on: December 10, 2009, 09:55:29 PM »
I want people to refer to my server as only the domain name, not host name + domain name, ie. as "mydomain.dk", not "myserver.mydomain.dk". But the template files for the web server and the mail server seem to always assume that the ssl-certificates will be for host + domain, not domain only.

I have now created the following custom template files:

/etc/e-smith/templates-custom/home/e-smith/ssl.pem/20key
/etc/e-smith/templates-custom/home/e-smith/ssl.pem/40crt
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/35SSL10SSLCertificateFile

and in these files deleted the references to host name.

This works OK, but isn't there a more elegant way to do this?

Best,
Jesper


......

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: How to use ssl-certificates with no host name?
« Reply #1 on: December 12, 2009, 12:36:45 AM »
holck

This has been a db command for some time, here's one reference found by searching on CommonName

http://wiki.contribs.org/Certificate#Custom_Certificate_for_SME_7.1.3_and_above
which says
config setprop modSSL CommonName www.domain.com
expand-template /home/e-smith/ssl.crt/crt
expand-template /home/e-smith/ssl.key/key
signal-event domain-modify
signal-event email-update
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.