Hello,
When I'm accessing my website (lets call it example.com for the sake of this post) via https://www.example.com it goes to the usr/local/apache/htdocs folder but on all other combination (http://www/ex... , http://ex... and https://ex...) it works fine.
I'm somewhat new to server-side stuff, but an hours Googling has informed me that it is most likely my vhosts.
The vhosts.conf is currently this (IP and website name changed obviously)
# vhost_start example.com
<VirtualHost MYIP:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /home/example/public_html
UseCanonicalName Off
ScriptAlias /cgi-bin/ /home/example/public_html/cgi-bin/
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/example/example.com/*.conf
<IfModule mod_userdir.c>
UserDir disabled
UserDir enabled example
</IfModule>
<IfModule mod_suexec.c>
SuexecUserGroup example example
</IfModule>
<IfModule mod_suphp.c>
suPHP_UserGroup example example
suPHP_ConfigPath /home/example
</IfModule>
<Directory "/home/example/public_html">
AllowOverride All
</Directory>
</VirtualHost>
# vhost_end example.com
And the vhosts-ssl-letsencrypt.conf is currently this (IP and website name changed obviously)
# vhost_start example.com
<VirtualHost MYIP:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /home/example/public_html
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example.com/fullchain.pem
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
<IfModule mod_suexec.c>
SuexecUserGroup example example
</IfModule>
<IfModule mod_suphp.c>
suPHP_UserGroup example example
suPHP_ConfigPath /home/example
</IfModule>
<Directory "/home/example/public_html">
AllowOverride All
</Directory>
</VirtualHost>
# vhost_end example.com
Any ideas of what may be causing it?
try to rebuild vhosts by simply saving your WebServer setting or use rebuild vhosts it should help.
If that doesn't help then I would say that ssl installation was failed on www and you should remove it and install again from autossl manager
I think this is an issue with the server having only one IP and its getting redirected to another path. Try to put a second IP on the server and dedicate it to the site. I hope this helps you. Thanks for asking!