Report this

What is the reason for this report?

SSL Certificate showing on all sites.

Posted on February 12, 2015

I installed a couple of self-signed SSL certificates following a tutorial on DO. They are working fine but there are other sites on the same droplet that do not have SSL certificates assigned to them. If you visit one of these site via https:// you get the browser warning and when you click on technical details it says the certificate is issued for one of the sites I set up an SSL cert for. How can I set it up so that the default is no SSL for sites that don’t have a cert? What have I set up incorrectly that the first cert installed on the server is showing for all domains on the server?

The droplet is Ubuntu 12.04

Thanks!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Do you have a default *:443 virtualhost configured?

probably the fastest easiest solution is to enable mod_rewrite for your sites,

https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite

and then add this to the .htaccess for each site:

#force http 
RewriteEngine On 
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

if someone types in https for your site, that should redirect them to http

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.