Ghost0
October 29, 2019, 5:31am
1
My domain is: http://clsindustriesllc.com
I ran this command: sudo a2enmod rewrite; sudo service apache2 restart
It produced this output: Module rewrite already enabled
… yet, http still does not auto redirect to https
My hosting provider is: Digital Ocean
I can login to a root shell on my machine: Yes
So yes, when you access my site from http://, it does not auto redirect.
Please assist!!
1 Like
Hi @Ghost0
checking your domain - https://check-your-website.server-daten.de/?q=clsindustriesllc.com
There is no redirect http -> https.
But there is an older check, created 2019-10-15. There is the correct redirect.
Looks like you have removed the redirect rule. Or you have changed your configuration, so now the wrong vHost is used.
Read the comments of the new check and add such a rule.
1 Like
rg305
October 29, 2019, 8:13am
3
Enabling the module merely expands the coding vocabulary to include “rewrite” type actions.
Now you need to include some code to tell anyone that connects to the http block to redirect to https.
For Apache, it would be something like:
RewriteEngine On
RewriteRule ^\.well-known\/acme-challenge\/ - [L]
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
or even as simple as:
RedirectMatch ^/(.*)$ https://%{HTTP_HOST}/$1
2 Likes
Ghost0
October 29, 2019, 10:40pm
4
Thank you both for the supports. I must admit, my coding and command line knowledge is a bit limited.
Would someone be able to assist me further?
(Yes, I could use some hand holding) >.<
1 Like
rg305
October 29, 2019, 10:43pm
5
It should be a very simple change.
Please show your vhost config for port 80.
[most likely a file located in the sites-enabled
folder]
1 Like
Ghost0
October 29, 2019, 10:46pm
6
… I still don’t exactly follow…
So I need to type something in my command line?
(Yes, this is how limited my knowledge is…)
1 Like
rg305
October 29, 2019, 11:08pm
7
Who manages the website?
Who put it all together?
Before you enforce TLS, the site should be readied - it’s not ready for that:
https://www.whynopadlock.com/results/37eff543-b1ac-4591-8a8c-33b7727b1873
1 Like
Ghost0
October 29, 2019, 11:14pm
8
I am the one who set it all up.
I just used Digital Ocean’s easy droplet creation app to install Wordpress.
I created my site.
However, again, my knowledge and understand isn’t up to par with your guys unfortunately.
Would you be able to assist me in a less tech savvy way??
Please.
I am just a general consumer with basic knowledge.
1 Like
rg305
October 29, 2019, 11:15pm
9
That is not the purpose of this forum but I will try to assist.
Do you have access to the command line (ssh terminal/console)?
1 Like
Ghost0
October 29, 2019, 11:16pm
10
I can understand that.
And yes, I do have access to the command line
rg305
October 29, 2019, 11:19pm
11
OK type the following and reply with the output:
ls -l /etc/apache2/sites-enabled/
rg305
October 29, 2019, 11:23pm
13
OK that’s perfect.
Two files:
one for HTTPS
one for HTTP
We will be modifying the one for HTTP (to insert the code to redirect everyone to HTTPS).
Please reply with output of:
cat /etc/apache2/sites-enabled/000-default.conf
1 Like
rg305
October 29, 2019, 11:28pm
15
It seems there is already code there to redirect…
Please show:
grep -Eri '80|clsindustries|include|virtual|servername|serveralias' /etc/apache2
rg305
October 29, 2019, 11:31pm
17
ls -l /etc/apache2/
Your text shows “>” where mines was “|”
1 Like
rg305
October 29, 2019, 11:33pm
19
copy and paste this command (don’t try to type it):
grep -Eri '80|clsindustries|include|virtual|servername|serveralias|listen' /etc/apache2
2 Likes
schoen
October 29, 2019, 11:33pm
20
@rg305 is looking for you to run the grep
command again, but using the correct |
rather than the incorrect >
character in between the various words in the search pattern.
2 Likes