Question about setting up SSL certificate

opike
opike used Ask the Experts™
on
I have an ssl certificate for a domain (let's say www.blap.com) and I want to try to set it up on a tomcat instance on an local server for testing purposes. Can I trick tomcat and the browser into accepting the ssl certificate by adding www.blap.com to the hosts file on the local server?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software and Hardware Engineer
Commented:
If you have *any* ssl certificate, then tomcat will accept that without any further adjustment - so the server side is fine. Importing the key into the tomcat JKS file (or if you are fronting tomcat via apache, supplying the pem encoded files for apache) is a different question of course, but plenty of web references for that.

To avoid any browser side warnings though, you must have set the IP of the server in your hosts file *on the client* and further, must have accessed the tomcat server via that dns name not via its IP (alternatively, you must arrange for the DNS supplied to the client to give that IP in response to that domain; sometimes easier to do if you control the local environment)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial