Forum Moderators: bakedjake

Message Too Old, No Replies

how to set up a test ssl cert at home?

         

jamie

6:35 pm on Mar 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i wondered if anyone has some tips on installing and testing an ssl certificate at home

i run redhat 7.2 / apache 1.3. i have a working dev server on a local IP address 192.168.XXX.XXX and it has its own reference in the hosts file but no fully qualified domain name.

is it possible to set up apache to use ssl on this sort of setup?

much obliged!

SeanW

2:39 pm on Mar 30, 2004 (gmt 0)

10+ Year Member



You should be able to build the cert with the IP address as the common name. As long as the web server is configured to respond to that you'll be fine.

Sean

jamie

5:55 pm on Mar 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



cheers Sean... off to try this out!

martin

7:25 pm on Apr 1, 2004 (gmt 0)

10+ Year Member



Jamie you can set the CN to whatever you want, doesn't have to be a fully qualified domain. I've used SSL certs without a dot in the hostname without any problems.

If you're going to have a couple of different certs it's best to create a certificate authority and import its cert into your browser so you don't get warnings on all https sites and don't have to import every single self signed certificate.

One thing to note you can't used name virtual hosts over SSL so you need separate IPs for every SSL enabled site.

jamie

7:04 am on Apr 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



martin thanks,

that's exactly what i did (no dot in the name), i used the server name which i set up in the /etc/hosts file and the one i use in my httpd.conf.

i now have 2 virtual host container blocks for the one IP

<VirtualHost 192.168.10.50:443>
DocumentRoot ...
ServerName myown-name
SSLEngine On
SSLCertificateFile ....
etc, etc
</VirtualHost>

<VirtualHost 192.168.10.50>
DocumentRoot ...
ServerName myown-name
</VirtualHost>

i can now access my site via [myown-name...] and https//myown-name

but, using IE everytime i try the https i get a popup alert that this page contains both secure and nonsecure items. if i click no then the padlock stays in the browser, if i click yes, the padlock goes away. using firefox i get a broken padlock in the bottom left corner.

all my images and files are local.

do you know why it is giving me this message, or more to the point how i can make it go away :-)

cheers martin

<added> its ok martin found the reason why... i was referencing http in a javascript file! </added>

martin

9:04 am on Apr 3, 2004 (gmt 0)

10+ Year Member



Yah, that's a common problem if you're accessing a https site all resources on the page - images, css, javascript has to come from a https site too.

I've seen some DHTML menu scripts that have issues because they create new iframes with a location of about:blank. You can just change this to an empty file on your https server.