Hi. I have the droplet with wordress.
wordpress-ubuntu-s-1vcpu-1gb-amd-sfo3-01 Apache, Ubuntu 20
I followed this instruction https://certbot.eff.org/instructions
Now it’s working. https://mydomain.com/
- ok
But http://mydomain.com/
doesn’t work =(
The redirect goes here https://root/
:
error DNS_PROBE_FINISHED_NXDOMAIN
The .htaccess
in /var/www/html
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Help me please
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.
SOLVED.
find the two files: 000-default.conf 000-default-le-ssl.conf
in the folders: /etc/apache2/sites-enabled/ /etc/apache2/sites-available/
Replace YOURDOMAIN to your domain =)
Remove the lines with the wrong URL that you see in the browser. Like this
000-default-le-ssl.conf
000-default.conf
restart Apache2 by command line or reset the server by “Power cycle”
Clear your browser cache
Enjoy
BIG THANX KFSys & Bobby Iliev
Hey @smallaquacrab,
The .htaccess file you’ve shown is perfectly fine. The issue is coming from your Apache virtual host and that is only for the HTTP part. Check your /etc/apache2/sites-available for the said vhost and if you need some help you can post it.
Most probably there is a redirect there which needs to be removed.
Hi there,
Your
.htaccess
file looks good. The problem is most likely coming from the Apache Virtual Host for your website.You can find the Apache virtual host in the following directory:
In there there will be a file for your HTTP and HTTPS versions of your website. You need to find the one for the HTTP version of your website and update the redirect in there so that it does not go to
https://root/
but tohttps://yourdomain.com
.Feel free to share the content of the file here and I can advise you which lines you need to change!
Best,
Bobby