website with ssl to respond with http and https

I have migrated a website from plesk virtual server to a Virtualmin virtual server. The site is a shopping site and has two parts. The main part is not secured and must respond to requests begining http:// the second part is secure and must respond to requests begining https://.

I can get the server to respond on http but then the secure part doesn’t work and I can get the secure part to work by installing a certificate and enabling SSL but then the site will only respond to https:// requests and not http:// requests.

Can anyone help me to get this working on a Virtualmin Virtual server.


Normally, when you want to do SSL – you’d have a single public_html folder for both http and https. And enabling SSL should be as simple as going into Edit Virtual Server -> Enabled Features, where you can enable the “SSL for Domain” feature.

Note that you can only have one SSL certificate per domain.

But, does the above sound like what you’re trying to do? You’re using a domain for http and https, and it shares one public_html folder?

What problem do you have exactly when SSL is enabled – what sort of error do you get when trying to access the http site?


Thank you Andreychek.

This website is currently being hosted on a PLESK server. When a shopper browses the shop he/she is just using http, however if the shopper then logs in to open an account or pay for something it is an https site. This works fine on the plesk and there is no issue switching between http and https. It is as you say hosted in a single virtual server on the plesk with a single httpdocs folder for the site files. There is only one certificate for the site. On the Virtual min server I have imported the plesk site which has created a virtual server on port 80. If I attach the certificate to the virtual server and enable ssl the site will only work as an https site and cannot be accessed using http. This is not acceptable as many of the URLS in the code links begin http and also the casual shopper has to type https at the beginning of the URL. I have tried adding a second virtual server pointing to the same folder under Apache on port 443 and attaching the certificate to this But I just get a page can not be displayed error.

I have fixed this now. I was installing the certificate in the virtual server under the apache server instead on the virtualmin server.