• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Issue Stop using default-domain for non-ssl?

Azurel

Silver Pleskian
When I have a subscription with not enabled SSL and go to https:// than its show the default-domain /var/www/vhosts/default/htdocs like http://server-ip with output "404 – Page Not Found"

How I can stop this?

Here a example. This website have no SSL https://www.golem.de and return "Error: Connection failed" in browser. Is this with plesk 12.5 possible for subscription that not have SSL enabled?
 
There is no good solution for this, because the user will probably receive a browser bad_cert_domain error and display an SSL warning before a configuration directive can influence the action. You can try to place this code in your .htaccess file in the document root of the website:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

This should redirect all https:// requests to http://, if users pass the bad_cert_domain error by adding an exception to their browser.
 
Thanks for your answer. I have test it with a domain that have not a valid SSL certif and add your code in "Additional directives for HTTPS". That not work for me. Nothing redirect to HTTP. Maybe here I must add this as nginx directives? But thats not possible in Plesk, because here is no SSL directive for nginx. That input is for both, http and https.
 
Last edited:
Back
Top