Create SSL Certificates In OpenSUSE 12.3
This article will help you to secure your Apache server by creating SSL certificates. Some people may need this to Secure their apache server. Please follow the bellow steps.
Create a random data file
# cat /dev/random > randomfile
Create key pair
# openssl genrsa -des3 -out server.key -rand randomfile
Sign the created Public Key and create a digital certificate
# openssl req -new -x509 -key server.key -out server.crt
Answer the questions and then copy the Public Key and digital certificate to the bellow mentioned folders.
# cp server.key /etc/apache2/ssl.key/ # cp server.crt /etc/apache2/ssl.crt/
Configure Apache to use OpenSSL (Optional)
Edit the /etc/sysconfig/apache2 file.
copy /etc/apache2/vhost.d/vhost-ssl.template to /etc/apache2/vhost.d/vhost-ssl.conf.
# cp /etc/apache2/vhost.d/vhost-ssl.template /etc/apache2/vhost.d/vhost-ssl.conf
Configure the main site to use HTTPS
Edit the /etc/apache2/default-server.conf file and add Include /etc/apache2/vhost.d/*.conf line in that file.
Include /etc/apache2/conf.d/*.conf Include /etc/apache2/vhosts.d/*.conf
Edit /etc/apache2/vhost.d/vhost-ssl.conf file as shown below:
<IfDefine SSL> <IfDefine !NOSSL> <VirtualHost *:443> DocumentRoot "/srv/www/htdocs" ServerName localhost:443 ErrorLog /var/log/apache2/error_log TransferLog /var/log/apache2/access_log SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 SSLCertificateFile /etc/apache2/ssl.crt/server.crt SSLCertificateKeyFile /etc/apache2/ssl.key/server.key <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory "/srv/www/cgi-bin"> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog /var/log/apache2/ssl_request_log ssl_combined </VirtualHost> </IfDefine> </IfDefine>
# /etc/init.d/apache2 restart redirecting to systemctl restart apache2 Enter SSL pass phrase for localhost:443 (RSA): ******
Check if the Port Listening
# netstat -an | grep 443 tcp 0 0 :::443 :::* LISTEN linux-j9hf:/etc/apache2/vhosts.d #
Navigate to https://IP-Address/ from your browser.
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04 : Power Commands, power management application created by the Atareao team , this app helps users to...0 comments |
- Install Uget Download Manager In Ubuntu, Fedora, Debian : uGet is a very light-weight and powerful open source download manager. On March 4th, 2014 Uget Do...0 comments |
- Install Crashplan backup tool in Linux : CashPlan is an automated backup solution that either uses the CrashPlan Central server or any other ...0 comments |
- Download Elementary OS 'Luna' Official Wallpapers : Hi Guys, Am a great lover of Elementary OS, so I like to move almost everywhere with some its beaut...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Fedora 21 Scheduled For Release In October
- Install Uget Download Manager In Ubuntu, Fedora, Debian
- Download Elementary OS ‘Luna’ Official Wallpapers
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
- Puppet agent Install Using Script
- Install Corosync and Pacemaker On CentOS 6.5
- Install Fail2Ban On Ubuntu Server 13.04/13.10
- How To Install Google Chrome in Fedora 20, 19, 18
- How to surf using Tor Browser Bundle
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .