Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm setting up a server for local access. I created a CA and have SSL certs signed and working on other domains.

The problem is I'm trying to create a cert for a domain name that is the same as the host name?

I copied the steps to make the cert for the other domain, but when I create and sign this cert, and modify httpd.conf with the path to the cert and key, the localhost.localdomain cert seems to be taking precedence. In other words, when I view the cert in firefox, it is the localhost.localdomain cert instead of the one I just created.

I looked at ssl.conf, and tried to change the default path to the one issued, and I tried to comment out the VirtualHost, but neither worked.

How can I override the servers default certificate with the one I issued and signed?

Thanks.


EDIT: I went back into ssl.conf and commented out everything between and including the <VirtualHost> tags. I restarted httpd and it is working as expected.

However, I'm not sure this is the best way to do this. Advice appreciated.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

This is pretty much the best way of doing it, the "default config" is more of guidelines then anything else. Most of my servers dont have anything remaining from the default config, and our virtual hosts all run the individual SSL for each website.

As long as the SSL engine is on, and you have your SSL config in your virtual hosts, this is a perfectly acceptable way to setup a production server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.