Results 1 to 5 of 5

Thread: Where to put SSL Certificates/Key in Suse 11

  1. #1

    Default Where to put SSL Certificates/Key in Suse 11

    Hi all,

    I'm relatively new to Linux/Apache and spent the last week pulling my hair out googleing,reading forms and the manuels trying to set up two virtual hosts running two Websites both with SSL on a Development Web server. I finally got it to work using name-based virtual hosting. My problem now is I have created one set of cetificates/keys for one domain using the mkcert.sh script mentioned in the manuel. Worked great and put the final files in the /etc/apache2/ssl.crt, ssl.key and ssl.csr directories where Suse 11 is looking for them. No problem until I try to create a second certificate/Key for my second virtual host. The script doesn't give you a choice as to the names of the output files so you can create more than one set. My question is, is there another directory or set of directories I can copy the first set to and point my virtual host to read them there and then create a new set (with the same names) and place them elsewhere. Or Do I need to do it from scratch using openssl?

    Thanks in advance for the help.
    jtaitt

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Where to put SSL Certificates/Key in Suse 11

    If you look at /etc/apache2/vhosts.d/vhost-ssl.template, each SSL virtual host can have its own cert file.

    But remember this: Certs are checked by taking the domain name and IP address and doing consistency checks on them. So you will have a mismatch between the virtual domain name and the canonical domain name (the one that the IP reverse maps to). So you will get an error from the browser saying that the name in the cert doesn't match the name in the reverse mapping. That's why you need one IP address per SSL host, in general. One way to work around that is to use a wildcard cert, which matches any host in a subdomain.

  3. #3

    Default Re: Where to put SSL Certificates/Key in Suse 11

    Thanks for the response.

    If I understand what you are saying, I can't make two separate certificates/keys which are named differently and point to the correct SSL certificate/key from with the virtualhost directives in each of my subdomains. Or is it only because they both have the same IP address? I thought only the Common Name was the issue. Then will it work on an ip-based virtual host which uses ip-aliases for multiple subdomains? My first choice was to use separate aliased ip's for each subdomain but couldn't
    get the aliased Ip's to stay around after a reboot. Which is the thread of another post I made today.

    I guess my next questions is then how would I create a wild card certificate for testing, or can I? I have a feeling they must be purchased. I'm not at that stage yet in my development.

    Thanks,
    jtaitt

    Thanks,
    jtaitt

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Where to put SSL Certificates/Key in Suse 11

    Oh there's no problem with the webserver handling multiple certs. But multiple certs are generally used with IP based virtual hosting. The problem is like this:

    1. You make a cert for say foo.example.com.
    2. User connects to https://foo.example.com.
    3. Web browser does a reverse map of the IP address of the server and finds it is foo.example.com.
    4. All is well.

    5. User connects to https://bar.example.com.
    6. Web browser does a reverse map of the IP address of the server and finds it is foo.example.com which is not bar.example.com as the second cert says.
    7. Browser gives the user a warning. Some browsers may even go so far as to block the access.

    This is why generally you can only have one SSL webserver per IP. Of course if you are running an internal webserver, you can use as many IPs as you like on private addresses, but public IPs in the outside world are a resource that have to be paid for.

    I've never needed to make a wildcard cert but from what I've read, it a matter of making a cert for *.example.com. That will match both of the domain names above.

  5. #5

    Default Re: Where to put SSL Certificates/Key in Suse 11

    Thanks again my friend, I appreciate the detailed explanations. It has helped me to understand the issues rather than just making a fix. Looks like I need to get the ip-aliasing issue worked out so I can use multiple addresses.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •