Author Topic: Site redirecting to usr/local/apache/htdocs  (Read 730 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Site redirecting to usr/local/apache/htdocs
« on: April 15, 2018, 03:07:15 AM »
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)

Code: [Select]
# 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)

Code: [Select]
# 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?

Offline
*
Re: Site redirecting to usr/local/apache/htdocs
« Reply #1 on: April 16, 2018, 09:04:47 AM »
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

VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.