nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Linux create self signed ssl certificate for Apache httpd server

This is a discussion on Linux create self signed ssl certificate for Apache httpd server within the Getting started tutorials forums, part of the Linux Getting Started category; You just need to enter following two commands: Yourdomain name: mycorp.com Directory: /etc/httpd/ssl/ #1: Enerate an SSL key without a ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-05-2007, 01:23 AM
raj raj is offline
Contributors
User
 
Join Date: Jun 2005
Location: Hyderabad
Posts: 146
Rep Power: 4
raj is on a distinguished road
Default Linux create self signed ssl certificate for Apache httpd server

You just need to enter following two commands:

Yourdomain name: mycorp.com
Directory: /etc/httpd/ssl/

#1: Enerate an SSL key without a passphrase, enter:
Code:
openssl genrsa -out /etc/httpd/ssl/mycorp.com.key 1024
#2: Create a self-signed certificate, enter:
Code:
openssl req -new -key /etc/httpd/ssl/mycorp.com.key -x509 -out /etc/httpd/ssl/mycorpcom.crt -days 999
Sample output:
Code:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:CA
Locality Name (eg, city) []:CA
Organization Name (eg, company) [Internet Widgits Pty Ltd]:mycorp, LLC
Organizational Unit Name (eg, section) []:Sales
Common Name (eg, YOUR name) []:  
Email Address []:you@mycorp.com
My Sample Apache httpd.conf virtual host file
Code:

DocumentRoot "/var/www/html/ssl_doc_root/"
ServerAdmin you@mycorp.com
ServerName www.mycorp.com
SSLEngine On
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:
+EXP:+eNULL
SSLCertificateFile /etc/httpd/ssl/mycorpcom.crt
SSLCertificateKeyFile /etc/httpd/ssl/mycorp.com.key
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
Restart httpd/Apche:
Code:
service httpd restart
__________________
Raj
Linux rulz.
I have never turned back in my life ; I shall not do so today.. haha
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to Create auto restore CD/DVD for linux ppnair Mail Servers 0 02-21-2008 02:46 PM
Upgrade Apache Server sweta Ubuntu / Debian 0 11-01-2007 02:53 AM
Postfix mail server create self-signed SSL certificates on Cent OS / Redhat linux rockdalinux Getting started tutorials 0 06-15-2007 06:21 PM
Apache php web server security by hiding version information nixcraft Getting started tutorials 1 12-20-2006 06:12 PM
Apache multiple IP based domains and one certificate tom All about FreeBSD/OpenBSD/NetBSD 1 06-26-2006 07:23 PM


All times are GMT +5.5. The time now is 04:53 PM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36