So you have the crt and key files on the server? Can you show the virtual host file for apache (the website)
Help: SSL Certificate + Ubuntu 18.06
Ive setup my own webserver with IONOS.co.uk and have a working site up and running... BUT i cant seem to find anywhere online that talks through the process start to finish on how to install SSL Ceritificates...
i have the files on my server but each time i edit the sites-available for my domain and change the port to 443 i get the ubuntu apache page....
can anyone point me in the right direction please.
Mike
Steps Taken
Summarizing what i did in order to get it all up and running. First off Enable the SSL Module on the server, if i had of done this earlier id have potentially figured it out sooner.
sudo a2enmod ssl
Copy your Certificates to your web server. i used the standard location on Ubuntu which is;
/usr/local/share/ca-certificates/
and the 3 files i had were as follows;
- raspada-blog.co.uk_ssl_certificate.cer
- _.raspada-blog.co.uk_private_key.key
- _.raspada-blog.co.uk_ssl_certificate_INTERMEDIATE.cer
Once they were uploaded i edited the Apache Conf for my domain (mine is below)
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName raspada-blog.co.uk
ServerAlias www.raspada-blog.co.uk
DocumentRoot /var/www/blog/public
SSLEngine on SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder On
SSLCertificateFile /usr/local/share/ca-certificates/raspada-blog.co.uk_ssl_certificate.cer
SSLCertificateKeyFile /usr/local/share/ca-certificates/_.raspada-blog.co.uk_private_key.key
SSLCertificateChainFile /usr/local/share/ca-certificates/_.raspada-blog.co.uk_ssl_certificate_INTERMEDIATE.cer
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName raspada-blog.co.uk
ServerAlias www.raspada-blog.co.uk
DocumentRoot /var/www/blog/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Stop and Start Apache by using the following commands:
sudo stop apache2
sudo start apache2
Now in your applications HTACCESS add the following 2 lines under the RewriteEngine On
RewriteEngine On ... RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Pull Your application to live, do your usual pull process (Dump-autoload etc) and enjoy the SSL on your site. and no matter what link people use to hit your application you will get the https version.
Please or to participate in this conversation.