nixCraft Linux Forum

nixCraft

Linux / UNIX 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

Linux answers from nixCraft.


Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-2007, 01:23 AM
raj's Avatar
raj raj is offline
Senior Member
User
 
Join Date: Jun 2005
Location: Hyderabad
OS: Fedora, Debian Linux
Posts: 307
Thanks: 42
Thanked 8 Times in 8 Posts
Rep Power: 6
raj will become famous soon enough raj will become famous soon enough
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
Reply


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 Off


Similar Threads

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


All times are GMT +5.5. The time now is 09:09 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

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 37 38