Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18th August 2006, 04:42 PM
linux_learner Offline
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.
Reply With Quote
  #2  
Old 18th August 2006, 10:01 PM
ccrvic Offline
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.
Reply With Quote
  #3  
Old 19th August 2006, 02:57 AM
linux_learner Offline
Registered User
 
Join Date: Jul 2005
Posts: 27
Thanks for pointing me to the how-to. I'll search and locate the document.
Reply With Quote
  #4  
Old 19th August 2006, 03:55 AM
pparks1's Avatar
pparks1 Offline
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.
Reply With Quote
  #5  
Old 19th August 2006, 04:04 AM
linux_learner Offline
Registered User
 
Join Date: Jul 2005
Posts: 27
Thanks for your valuable contribution. I will work on this. This is useful stuff.
Reply With Quote
  #6  
Old 14th October 2008, 09:20 PM
Paavo Offline
Registered User
 
Join Date: May 2006
Posts: 26
Quote:
Originally Posted by pparks1 View Post

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
Reply With Quote
  #7  
Old 22nd October 2008, 09:57 PM
farhad.khan Offline
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.
Reply With Quote
  #8  
Old 22nd October 2008, 11:12 PM
Paavo Offline
Registered User
 
Join Date: May 2006
Posts: 26
firewall configuration?
Reply With Quote
  #9  
Old 23rd October 2008, 02:13 AM
farhad.khan Offline
Registered User
 
Join Date: Oct 2008
Posts: 4
Thanks a lot. It was the linux firewall blocking port 443 It is now working.
Reply With Quote
  #10  
Old 23rd October 2008, 04:29 AM
farhad.khan Offline
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.
Reply With Quote
  #11  
Old 27th October 2008, 07:45 PM
Paavo Offline
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.
Reply With Quote
  #12  
Old 28th October 2008, 03:24 AM
farhad.khan Offline
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.
Reply With Quote
Reply

Tags
certificate, fc5, generate, https, signed, ssl, test

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Server certificate verification error: unable to get local issuer certificate James Board Using Fedora 0 4th September 2008 12:42 AM
How to Generate X.509 Certificate fred_m Security and Privacy 3 5th April 2008 04:11 PM
Creating a Self Signed Certificate for MTAs and FC4 SharedMedia Guides & Solutions (No Questions) 0 22nd July 2005 06:14 PM


Current GMT-time: 09:41 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat