<p dir="ltr">If you are looking to build VMs that are consistent, you should really be using Vagrant to build your VMs.</p>
<p dir="ltr">Kevin </p>
<div class="gmail_quote">On Jul 4, 2015 4:41 PM, "Keith Smith" <<a href="mailto:techlists@phpcoderusa.com">techlists@phpcoderusa.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Thanks!!! I'll try this. I'm hoping for once cert for all sites.<br>
<br>
<br>
<br>
On 2015-07-04 15:34, JD Austin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Usually it's something like this:<br>
<br>
# Generate private key<br>
openssl genrsa -out ca.key 2048<br>
<br>
# Generate CSR<br>
openssl req -new -key ca.key -out ca.csr<br>
<br>
# Generate Self Signed Key<br>
openssl x509 -req -days 999 -in ca.csr -signkey ca.key -out ca.crt<br>
<br>
# Copy the files to the correct locations<br>
cp ca.crt /etc/pki/tls/certs/localhost.crt<br>
cp ca.key /etc/pki/tls/private/localhost.key<br>
cp ca.csr /etc/pki/tls/private/ca.csr<br>
<br>
-- JD Austin<br>
Voice: <a href="tel:480.269.4335" value="+14802694335" target="_blank">480.269.4335</a> (480 2MY Geek)<br>
<a href="mailto:jd@twingeckos.com" target="_blank">jd@twingeckos.com</a><br>
<br>
On Fri, Jul 3, 2015 at 8:17 PM, Keith Smith<br>
<<a href="mailto:techlists@phpcoderusa.com" target="_blank">techlists@phpcoderusa.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It was easier to just start over - 20 min and the cert is not an<br>
issue any longer.<br>
<br>
On 2015-07-03 18:39, Keith Smith wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I'm setting up a VirtualBox and am setting up a VM using CentOS<br>
6.6.<br>
Everything was running and I could see default welcome page in<br>
desktop<br>
by using the IP for the URL.<br>
<br>
Then I wanted to configure a virtual host as a dev / test site.<br>
<br>
I tried creating the SSL Cert by using openssl.<br>
<br>
# cd /etc/pki/tls/certs<br>
# make mycert.pem<br>
<br>
This confused me. I noticed there was a file<br>
/etc/pki/tls/localhost.crt that had been created today so I<br>
deleted<br>
it.<br>
<br>
Ten I using the command:<br>
<br>
openssl req -x509 -nodes -days 4000 -newkey rsa:2048 -keyout<br>
/etc/httpd/ssl/test-site-name.key -out<br>
/etc/httpd/ssl/test-site-name.crt<br>
<br>
Which created the certs.<br>
<br>
I configured the virtual host and when I restarted Apache it just<br>
fails w/o any message.<br>
<br>
The logs:<br>
<br>
tail error_log<br>
[Fri Jul 03 17:49:36 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
[Fri Jul 03 17:51:27 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
[Fri Jul 03 17:52:28 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
[Fri Jul 03 17:56:13 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
[Fri Jul 03 17:57:13 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
[Fri Jul 03 17:57:19 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
[Fri Jul 03 17:59:35 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
[Fri Jul 03 18:02:14 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
[Fri Jul 03 18:02:46 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
[Fri Jul 03 18:03:17 2015] [notice] suEXEC mechanism enabled<br>
(wrapper:<br>
/usr/sbin/suexec)<br>
<br>
tail ssl_error_log<br>
[Fri Jul 03 18:02:14 2015] [error] Unable to configure RSA server<br>
private key<br>
[Fri Jul 03 18:02:14 2015] [error] SSL Library Error: 185073780<br>
error:0B080074:x509 certificate<br>
routines:X509_check_private_key:key<br>
values mismatch<br>
[Fri Jul 03 18:02:46 2015] [warn] RSA server certificate is a CA<br>
certificate (BasicConstraints: CA == TRUE !?)<br>
[Fri Jul 03 18:02:46 2015] [warn] RSA server certificate<br>
CommonName<br>
(CN) `localhost.localdomain' does NOT match server name!?<br>
[Fri Jul 03 18:02:46 2015] [error] Unable to configure RSA server<br>
private key<br>
[Fri Jul 03 18:02:46 2015] [error] SSL Library Error: 185073780<br>
error:0B080074:x509 certificate<br>
routines:X509_check_private_key:key<br>
values mismatch<br>
[Fri Jul 03 18:03:17 2015] [warn] RSA server certificate is a CA<br>
certificate (BasicConstraints: CA == TRUE !?)<br>
[Fri Jul 03 18:03:17 2015] [warn] RSA server certificate<br>
CommonName<br>
(CN) `localhost.localdomain' does NOT match server name!?<br>
[Fri Jul 03 18:03:17 2015] [error] Unable to configure RSA server<br>
private key<br>
[Fri Jul 03 18:03:17 2015] [error] SSL Library Error: 185073780<br>
error:0B080074:x509 certificate<br>
routines:X509_check_private_key:key<br>
values mismatch<br>
<br>
Tried:<br>
<br>
openssl x509 -noout -modulus -in your_domain_com.crt | openssl<br>
md5<br>
openssl rsa -noout -modulus -in your_domain_com.key | openssl md5<br>
<br>
and got matching numbers.<br>
<br>
Any help is much appreciated.<br>
</blockquote>
<br>
--<br>
Keith Smith<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a> [1]<br>
</blockquote>
<br>
<br>
<br>
Links:<br>
------<br>
[1] <a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
</blockquote>
<br>
-- <br>
Keith Smith<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote></div>