Sei sulla pagina 1di 3

Pricing Features Customers Help & Community Free Sign Up Login Help & Community Articles & Tutorials

Forum Chat Blog

Related Articles

Ubuntu
How to Install and Use PostgreSQL on Ubuntu 12.04 How to Install phpPgAdmin on a Virtual Server Running Ubuntu 12.04 How to Launch Your Site on a New Ubuntu 12.04 Server with LAMP, FTP, and DNS How to Install CouchDB and Futon on Ubuntu 12.04 How to Install and Setup Postfix on Ubuntu 12.04

Apache
How to Set Up Multiple SSL Certificates on One IP with Apache on Ubuntu 12.04 How to Install LAMP (Linux, Apache, MySQL, PHP) on Fedora How to Set Up Multiple WordPress Sites Using Multisite How to Create a SSL Certificate on Apache on Arch Linux How to Launch Your Site on a New Ubuntu 12.04 Server with LAMP, FTP, and DNS

All Articles
How to Launch Your Site on a New Ubuntu 12.04 Server with LAMP, FTP, and DNS How to Use SSH Keys with DigitalOcean Droplets How to Install CouchDB and Futon on Ubuntu 12.04 How to Install zPanel on CentOS 6 How to Install and Setup Postfix on Ubuntu 12.04

How to Create a SSL Certificate on Apache for Ubuntu 12.04


Tw eet 7

About Self-Signed Certificates

A SSL certificate is a way to encrypt a site's information and create a more secure connection. Additionally, the certificate can show the virtual private server's identification information to site visitors. Certificate Authorities can issue SSL certificates that verify the server's details while a self-signed certificate has no 3rd party corroboration.

Set Up
The steps in this tutorial require the user to have root privileges on the VPS. You can see how to set that up here in steps 3 and 4. Additionally, you need to have apache already installed and running on your virtual server. If this is not the case, you can download it with this command:
sd atgtisalaah2 uo p-e ntl pce

Step OneActivate the SSL Module


The next step is to enable SSL on the droplet.
sd aemdsl uo 2no s

Follow up by restarting Apache.


sd srieaah2rsat uo evc pce etr

Step TwoCreate a New Directory


We need to create a new directory where we will store the server key and certificate
sd mdr/t/pce/s uo ki ecaah2sl

Step ThreeCreate a Self Signed SSL Certificate


When we request a new certificate, we can specify how long the certificate should remain valid by changing the 365 to the number of days we prefer. As it stands this certificate will expire after one year.
sd oeslrq-59-oe -as35-ekyra24 -eot/t/pce/s/pceky-u /t/pce/s/pcect uo pns e x0 nds dy 6 nwe s:08 kyu ecaah2slaah.e ot ecaah2slaah.r

With this command, we will be both creating the self-signed SSL certificate and the server key that protects it, and placing both of them into the new directory. This 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.
Yuaeaott b akdt etrifrainta wl b icroae o r bu o e se o ne nomto ht il e noprtd it yu criiaerqet no or etfct eus. Wa yuaeaott etri wa i cle aDsigihdNm o aD. ht o r bu o ne s ht s ald itnuse ae r N Teeaeqieafwfed btyucnlaesm bak hr r ut e ils u o a ev oe ln Frsm fed teewl b adfutvle o oe ils hr il e eal au, I yuetr'' tefedwl b lf bak f o ne ., h il il e et ln. ---CutyNm ( lte cd)[U:S onr ae 2 etr oe A]U Saeo Poic Nm (ulnm)[oeSae:e Yr tt r rvne ae fl ae Sm-tt]Nw ok Lclt Nm (g ct)[:Y oaiy ae e, iy ]NC Ognzto Nm (g cmay [nentWdisPyLd:wsm Ic raiain ae e, opn) Itre igt t t]Aeoe n Ognztoa Ui Nm (g scin [:eto Mriet raiainl nt ae e, eto) ]Dp f ermn Cmo Nm (..sre FD o YU nm)[:xml.o omn ae eg evr QN r OR ae ]eapecm EalAdes[:emse@wsmiccm mi drs ]wbatraeoen.o

Step FourSet Up the Certificate

Now we have all of the required components of the finished certificate.The next thing to do is to set up the virtual hosts to display the new certificate. Open up the SSL config file:
sd nn /t/pce/ie-vial/eal-s uo ao ecaah2stsaalbedfutsl

Within the section that begins with <VirtualHost _default_:443>, quickly make the following changes. Add a line with your server name right below the Server Admin email:
SreNm eapecm43 evrae xml.o:4

Replace example.com with your DNS approved domain name or server IP address (it should be the same as the common name on the certificate). Find the following three lines, and make sure that they match the extensions below:
SLnieo SEgn n SLetfctFl /t/pce/s/pcect SCriiaeie ecaah2slaah.r SLetfctKyie/t/pce/s/pceky SCriiaeeFl ecaah2slaah.e

Save and Exit out of the file.

Step FiveActivate the New Virtual Host


Before the website that will come on the 443 port can be activated, we need to enable that Virtual Host:
sd aest dfutsl uo 2nie eal-s

You are all set. Restarting your Apache server will reload it with all of your changes in place.
sd srieaah2rla uo evc pce eod

In your browser, type https://youraddress, and you will be able to see the new certificate.

See More
Once you have setup your SSL certificate on the site, you can Install an FTP server if you haven't done so yet.

Comments

bossman759 I Get An Error bossman759@ubuntu:~$ sudo service apache2 reload Syntax error on line 173 of /etc/apache2/sites-enabled/default-ssl: SSLCertificateKeyFile: file '/etc/apache2/ssl/apache.ke' does not exist or is empty Action 'configtest' failed. The Apache error log may have more information. ...fail! Posted July 16th, 2012 21:36

Potrebbero piacerti anche