 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

18th August 2006, 04:42 PM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 27

|
|
|
generate a self signed SSL certificate on FC5 to test https
I would like to use openSSL to generate a self signed SSL cert to be used on the default HTTPD that comes with FC5. How should I go about doing this?
Thanks.
|

18th August 2006, 10:01 PM
|
|
Registered User
|
|
Join Date: Apr 2006
Posts: 1,092

|
|
Quote:
|
Originally Posted by linux_learner
I would like to use openSSL to generate a self signed SSL cert to be used on the default HTTPD that comes with FC5. How should I go about doing this?
|
If you're not happy following one of the howtos & running openssl from the command line, install Webmin & get the "Certificate Manager" (IIRC) module. Makes life much easier :-)
Vic.
|

19th August 2006, 02:57 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 27

|
|
|
Thanks for pointing me to the how-to. I'll search and locate the document.
|

19th August 2006, 03:55 AM
|
 |
Registered User
|
|
Join Date: Mar 2004
Location: Westland, Michigan
Age: 38
Posts: 2,317

|
|
Quote:
|
If you're not happy following one of the howtos
|
My guess is that you didn't find this very helpful
**********************************************
Here is what I would do; (this should put you on the right track)
Code:
openssl req -new -nodes -out server.csr -keyout server.key
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 999
chmod 600 server.*
cp -a server.crt /etc/pki/tls/certs/
cp -a server.key /etc/pki/tls/private/
Then, edit /etc/httpd/conf.d/ssl.conf
Look for the following;
Code:
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
Change to
Code:
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
Finally, restart apache with
Code:
service httpd restart
__________________
RHCE and MCSE systems administrator
Registered Linux User #375155 For More Info or to register yourself
My Linux box is:
Ubuntu 8.04, Antec Sonata II case with 450-watt PS, AMD 64 X2 4600+ (65 watt), 4GB DDR2 800 RAM, 18X Lite-On DVD burner, Asus M2NPV-VM, Nvidia GeForce 7600GT (256MB), 320GB Western Digital SATA 3.0Gbps, Logitech MX-310, Dell 18" ultrasharp LCD, Microsoft Natural Ergonomic Keyboard 4000 and 2.1 Boston Acoustics sound system..
Last edited by pparks1; 19th August 2006 at 04:00 AM.
|

19th August 2006, 04:04 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 27

|
|
|
Thanks for your valuable contribution. I will work on this. This is useful stuff.
|

14th October 2008, 09:20 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 26

|
|
Quote:
Originally Posted by pparks1
Code:
openssl req -new -nodes -out server.csr -keyout server.key
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 999
chmod 600 server.*
cp -a server.crt /etc/pki/tls/certs/
cp -a server.key /etc/pki/tls/private/
Then, edit /etc/httpd/conf.d/ssl.conf
Code:
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
|
THANKS, this was excatly what I was looking for. I wanted to get rid of these error messages in /var/log/httpd/ssl_error_log:
Code:
RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
I also modified the server name in /etc/httpd/conf.d/ssl.conf:
Code:
# diff ssl.conf ssl.conf.orig
81c81
< <VirtualHost myserver.domain.com:443>
---
> <VirtualHost _default_:443>
85c85
< ServerName myserver.domain.com:443
---
> #ServerName www.example.com:443
-Paavo
|

22nd October 2008, 09:57 PM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 4

|
|
|
I followed this setup in an FC7 box. After setting it all up and restarting apache I can see that the server is listening on port 443 but am not able to access webpages in the server using https. http is working as usual.
Selinux is disabled. Router ports 80 and 443 are forwarded to the linux box.
Any thoughts anyone?
Thanks.
|

22nd October 2008, 11:12 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 26

|
|
|
firewall configuration?
|

23rd October 2008, 02:13 AM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 4

|
|
Thanks a lot. It was the linux firewall blocking port 443  It is now working.
|

23rd October 2008, 04:29 AM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 4

|
|
|
Now that it is working, I have another problem ... every time the system boots up and runs httpd it waits at the pass-phrase prompt and does not proceed with the boot until the pass-phrase for httpd has been entered.
Can this pass-phrase be left blank? It did not let me put a blank pass-phrase.
|

27th October 2008, 07:45 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 26

|
|
|
I followed pparks1's instructions, and I don't need to enter pass-phrase again.
If you try to fix it and want to test if it works or not, doing "/etc/init.d/httpd restart" is much faster than reboot.
|

28th October 2008, 03:24 AM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 4

|
|
|
OK it worked. Before I had specified an RSA encryption for the local files. That should have been ignored. Also thanks for the quick tip of restarting apache only. I know it but when troubleshooting things like this are easily missed. I had taken httpd out of the active runlevel, so that the prompt for httpd RSA passphrase doesn't block the regular boot.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 10:05 (Friday, 24-05-2013)
|
|
 |
 |
 |
 |
|
|