Created
January 29, 2014 13:04
-
-
Save jsven69gist/8687484 to your computer and use it in GitHub Desktop.
Apache: SSL (https) configuration/setup on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSL on Ubuntu | |
Install ss-cert package: | |
apt-get install ssl-cert | |
Activate ssl module on Apache2: | |
a2enmod ssl | |
Configure Apache2 for https: | |
a2ensite default-ssl | |
...or use it as basis | |
Add NameVirtualHost *:443 to ports.conf | |
And: change #<VirtualHost _default_:443> to <VirtualHost *:443> in default-ssl | |
You may need to add: | |
<VirtualHost *:80> | |
ServerName yourservername.yourdomain.com | |
Redirect / https://yourservername.yourdomain.com | |
</VirtualHost> | |
to 000-default in sites-enabled or something | |
Create your own (self-signed) certificate: | |
make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/private/meaningfullname.crt | |
You are promted for hostname which should be same hostname as ServerName in VirtualHost | |
Change SSLCertificateFile in config file to the name of the file created with full path | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment