Home » Categories » Multiple Categories |
How To Create a SSL Certificate on Apache on Arch Linux |
Article Number: 217 | Rating: Unrated | Last Updated: Sun, Dec 29, 2013 at 6:40 AM
|
Step One—Switch Into the Apache Config DirectoryThe first step is move into the main apache configuration directory. All of the subsequent steps will take place within the directory:cd /etc/httpd/conf Step Two—Create a Self Signed SSL CertificateStart off by creating the 1024 rsa private key. The "-des3” option designates the need for a passphrase. Although having the passphrase in place does provide heightened security, the issue starts when one tries to reload apache. In the event that apache crashes or needs to reboot, you will always have to re-enter your passphrase to get your entire web server back online.sudo openssl genrsa -des3 -out server.key 1024\Now it’s time to create a certificate-signing request. If you set up a passphrase in the previous step, you will be prompted to enter it in this step as well: sudo openssl req -new -key server.key -out server.csrThis command will prompt terminal to display a lists of fields that need to be filled in. The most important line is "Common Name". Enter your official domain name here or, if you don't have one yet, your site's IP address. 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]:New York Locality Name (eg, city) []:NYC Organization Name (eg, company) [Internet Widgits Pty Ltd]:Awesome Inc Organizational Unit Name (eg, section) []:Dept of Merriment Common Name (e.g. server FQDN or YOUR name) []:example.com Email Address []:webmaster@yourdomain.comFinally, remove the passphrase: sudo cp server.key server.key.org sudo openssl rsa -in server.key.org -out server.keyFinish by specifying how long the certificate should remain valid by changing the 365 to the number of days you prefer. As it stands this certificate will expire after one year. sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt Step Three—Finish UpYour certificate has been created and signed. You only have to be sure that apache includes it in its configuration. Go ahead and open up the main apache config file:sudo nano /etc/httpd/conf/httpd.confOnce there, uncomment the following line: Include conf/extra/httpd-ssl.confRestart apache to put your changes into effect: sudo systemctl restart httpdIn your browser, type https://youraddress, and you will be able to see the new self-signed certificate. |
Attachments
![]()
There are no attachments for this article.
|
How To Manage Content Using the Ghost Blogging Platform
Viewed 9002 times since Sun, Dec 29, 2013
How To Configure and Maintain Ghost from the Command Line
Viewed 6794 times since Sun, Dec 29, 2013
How To Install And Run A Node.js App On Centos 6.4 64bit
Viewed 10612 times since Sun, Dec 29, 2013
How To Set Up MySQL Master-Master Replication
Viewed 3090 times since Thu, Dec 26, 2013
How To Set Up an NFS Mount on Ubuntu 12.04
Viewed 10640 times since Tue, Dec 24, 2013
How To Setup Ruby on Rails with Postgres
Viewed 11786 times since Mon, Dec 30, 2013
How To Use Yaourt to Easily Download Arch Linux Community Packages
Viewed 4330 times since Fri, Dec 27, 2013
How To Use a Simple Bash Script To Restart Server Programs
Viewed 3406 times since Fri, Dec 27, 2013
How To Install an Upstream Version of Node.js on Ubuntu 12.04
Viewed 2792 times since Sun, Dec 29, 2013
An Introduction to Linux Basics
Viewed 6667 times since Fri, Dec 27, 2013
|