devesh Posted July 19, 2019 Posted July 19, 2019 Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator at webmaster@devesh.heliohost.org to inform them of the time this error occurred, and the actions you performed just before this error.More information about this error may be available in the server error log.Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.-------------------------------------------------------------------------------- I tried to install free SSL certificate and getting this error message.I removed SSL Certificate but still getting the same error while opening my subdomain i.e. devesh.heliohost.org
Flaze Posted July 19, 2019 Posted July 19, 2019 Your website is on Tommy. You don't need to manually install SSL certificate since AutoSSL will do that for you.Your website works now (with SSL). https://devesh.heliohost.orgNote that it won't redirect you to HTTPS if you try to access it from HTTP. You need to add some code to your .htaccess file in order to achieve that.EDIT: The SSL stopped working. Most likely because he removed it.
Sn1F3rt Posted July 19, 2019 Posted July 19, 2019 Note that it won't redirect you to HTTPS if you try to access it from HTTP. You need to add some code to your .htaccess file in order to achieve that.And here goes the code: (Assuming you have existing code in .htaccess file) RewriteEngine OnRewriteCond %{SERVER_PORT} 80RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L] And if you don't have (that is you are creating a new file) then: <IfModule mod_rewrite.c>RewriteEngine OnRewriteCond %{SERVER_PORT} 80RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L]</IfModule>
wolstech Posted July 19, 2019 Posted July 19, 2019 @sohamb03: Doing that will break AutoSSL because it won't be able to renew when the cert expires. It either needs an exception added for .well-known, or he add a redirect in index.php instead of using .htaccess.
Sn1F3rt Posted July 20, 2019 Posted July 20, 2019 Oh I see! Then this might help: For HTML: (Add a meta tag) < meta http-equiv="Refresh" content="0;URL=https://www.example.com" /> For PHP: < ?php function redirectTohttps() { if($_SERVER['HTTPS']!=”on”) { $redirect= “https://”.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];header(“Location:$redirect”); } } ?>
devesh Posted July 20, 2019 Author Posted July 20, 2019 (edited) I tried to reset everything that i made wrong but now getting another error Don't know what to do now??? domain - devesh.heliohost.org Edited July 20, 2019 by devesh
Sn1F3rt Posted July 20, 2019 Posted July 20, 2019 You need to wait for an APache restart on Tommy...It will set everything alright.
wolstech Posted July 20, 2019 Posted July 20, 2019 That meta tag will cause an infinite loop. The PHP method is what I use. It's a nice choice because it lets you still access other files on the server over plain http if necessary without adding a bunch of exceptions for them, but the average joe visiting your site will still be given an https connection.
Flaze Posted July 20, 2019 Posted July 20, 2019 @wolstech: Really hard to integrate if you use a CMS though. @sohamb03: It redirects to the same page. The meta tag will still function even if the URL is in HTTPS. That will cause an infinite loop.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now