Success! Your new web server is ready to use. Not website loading public_html

Hello I ran the default HestiaCP install on a clean install of Ubuntu 20.04 and Debian 9 (Provided by OVH hosting) and I am experiencing a recurring issue.

The HestiaCP installs process as per normal, however once web sites are created via the panel I get a default page.

“Success! Your new web server is ready to use.”

But nothing is loading from the allocated public_html folders.

I have tried, uninstalling the Let’s Encrypt SSL certs as they were previously issued by the VestaCP on that VPS so used existing server IP to revoke and re-issue but to no avail.
I have checked file permissions and ownerships all set to the admin user.

Disabling the nginx, “rebuilding” standing on my head, clapping, blowing, yoga and mindfulness.

The cpanel it’self works flawlessly so far. The SSL cert even runs on the default domain, phpmyadmin everything seems fine but it just refuses to load the website in the public_html folder.

Like I said 2 clean OS installs, presently on Debian 9

if you could give me some more details of your setup i might be able to assist you better. But from given details:

web files should belong to user:www-data. If you have set up all your websites with admin user. you need to chown the public_html folder as: chown -R admin:www-data public_html

1 Like

Wow thanks for the feedback Dennis, I suspected that too with the red warning light on “don’t do this as admin” there be dragons.

I took your suggestions with the chown commands for the website created under the admin user.

These are the present permissions.

[email protected]:/home/host/web/user-domain.com# cd /home/admin/web/admin-domain.com/
[email protected]:/home/admin/web/admin-domain.com# ls -la

dr-xr-x–x 9 admin admin 4096 Feb 9 07:40 .
drwxr-xr-x 4 admin admin 4096 Feb 9 19:24 …
drwxr-x–x 2 admin admin 4096 Feb 9 06:48 cgi-bin
drwxr-x–x 2 admin admin 4096 Feb 9 07:40 document_errors
dr-xr-x–x 2 admin admin 4096 Feb 9 07:40 logs
drwxr-x–x 2 admin admin 4096 Feb 9 06:48 private
drwxr-x–x 5 admin www-data 4096 Feb 9 09:33 public_html
drwxr-x–x 2 admin www-data 4096 Feb 9 06:48 public_shtml
dr-xr-x–x 2 admin admin 4096 Feb 9 06:48 stats
[email protected]:/home/admin/web/admin-domain.com# cd public_html/

[email protected]:/home/admin/web/admin-domain.com/public_html# ls -la
drwxr-x–x 5 admin www-data 4096 Feb 9 09:33 .
dr-xr-x–x 9 admin admin 4096 Feb 9 07:40 …
-rw-r–r-- 1 admin www-data 235 Feb 9 07:05 .htaccess
-rw-r–r-- 1 admin www-data 418 Feb 9 07:05 index.php
-rw-r–r-- 1 admin www-data 19550 Feb 9 07:05 license.txt
-rw-r–r-- 1 admin www-data 7322 Feb 9 07:05 readme.html
etc…

Success!
Your new web server is ready to use. (so permissions didn’t do the trick, perhaps I did not chown correctly)

I then created a user on the system to see what permissions were defaulted when adding a domain (so that I could compare to the admin account).

[email protected]:/home/admin/web/admin-domain.com/public_html# cd /home/host/web/user-domain.com/
[email protected]:/home/host/web/user-domain.com# ls -la

drwxr-x–x 9 host host 4096 Feb 9 19:30 .
drwxr-xr-x 3 host host 4096 Feb 9 19:30 …
drwxr-x–x 2 host host 4096 Feb 9 19:30 cgi-bin
drwxr-x–x 2 host host 4096 Feb 9 19:30 document_errors
dr-xr-x–x 2 host host 4096 Feb 9 19:30 logs
drwxr-x–x 2 host host 4096 Feb 9 19:30 private
drwxr-x–x 5 host www-data 4096 Feb 9 19:37 public_html
drwxr-x–x 2 host www-data 4096 Feb 9 19:30 public_shtml
dr-xr-x–x 2 host host 4096 Feb 9 19:30 stats

[email protected]:/home/host/web/user-domain.com# cd public_html/
[email protected]:/home/host/web/user-domain.com/public_html# ls -la

drwxr-x–x 5 host www-data 4096 Feb 9 19:37 .
drwxr-x–x 9 host host 4096 Feb 9 19:30 …
drwxr-xr-x 2 host host 4096 Feb 9 19:37 files
-rw-r–r-- 1 host host 431 Feb 9 19:37 .htaccess
-rw-r–r-- 1 host host 42814 Feb 9 19:37 index.php
-rw-r–r-- 1 host host 2 Feb 9 19:37 robots.txt
drwxr-xr-x 3 host host 4096 Feb 9 19:37 themes
etc…

Initially, the user-domain.com loaded the document root with the under-construction message, but as soon as I enabled the let’s encrypt SSL certificate it also spawned the Success! Your new web server is ready to use page.

I was running some of these domains on the server before, I’m not sure if it’s some clash between SSL’s issued but even if I disable the let’s encrypt SSL certificate, I still get the same response. Success!

Best Regards
Doug

Any changes to templates / system…

Hey eris, no literally a clean install on Debian 9.

I did an unattended install on Ubuntu 20.04 then attended the Debian 9 install both produced the same scenario.

Only a couple of sites on the server, I’m going to run another clean OS install and see.

D

All the templates seem to be set to default.

can you please share your nginx.conf and apach2.conf from said domain?
/home/admin/conf/web/admin-domain.com/

Appreciate the help Dennis but my inpatient, blunt force persona just pushed the re-install button to rule out any potential errors between the chair and keyboard.

I will update when the new install completes and see if any bugs remain.

Fresh install Debian 10, no hitches in install, no changes to anything

Logged in with admin account, created a user account, logged in with user account, added a domain (which was already pointed to the server IP) but the same issue persists.

#=======================================================================#

Default Web Domain Template

DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS

#=======================================================================#

<VirtualHost 51.255.32.6:8080>

ServerName fqdomain.co.za

ServerAdmin [email protected]
DocumentRoot /home/admin/web/fqdomain.co.za/public_html
ScriptAlias /cgi-bin/ /home/admin/web/fqdomain.co.za/cgi-bin/
Alias /vstats/ /home/admin/web/fqdomain.co.za/stats/
Alias /error/ /home/admin/web/fqdomain.co.za/document_errors/
#SuexecUserGroup admin admin
CustomLog /var/log/apache2/domains/fqdomain.co.za.bytes bytes
CustomLog /var/log/apache2/domains/fqdomain.co.za.log combined
ErrorLog /var/log/apache2/domains/fqdomain.co.za.error.log

IncludeOptional /home/admin/conf/web/fqdomain.co.za/apache2.forcessl.conf*

<Directory /home/admin/web/fqdomain.co.za/stats>
    AllowOverride All
</Directory>
<Directory /home/admin/web/fqdomain.co.za/public_html>
    AllowOverride All
    Options +Includes -Indexes +ExecCGI
</Directory>

<FilesMatch \.php$>
    SetHandler "proxy:unix:/run/php/php7.4-fpm-fqdomain.co.za.sock|fcgi://localhost"
</FilesMatch>
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

IncludeOptional /home/admin/conf/web/fqdomain.co.za/apache2.conf_*

There is no cloudflare in-between or anything like that.

Systemctl status nginx / apache2?

And nginx -t
apachectl configtest

NginX

DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS

server {
listen 51...6:80;
server_name userdomain.co.za ;

include /home/admin/conf/web/userdomain.co.za/nginx.forcessl.conf*;

location / {
    proxy_pass      http://51.*.*.6:8080;
    location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|odt|ods|odp|odf|tar|wav|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
        root           /home/admin/web/userdomain.co.za/public_html;
        access_log     /var/log/apache2/domains/userdomain.co.za.log combined;
        access_log     /var/log/apache2/domains/userdomain.co.za.bytes bytes;
        expires        max;
        try_files      $uri @fallback;
    }
}

location /error/ {
    alias   /home/admin/web/userdomain.co.za/document_errors/;
}

location @fallback {
    proxy_pass      http://51.*.*.6:8080;
}

location ~ /\.ht    {return 404;}
location ~ /\.svn/  {return 404;}
location ~ /\.git/  {return 404;}
location ~ /\.hg/   {return 404;}
location ~ /\.bzr/  {return 404;}

include /home/admin/conf/web/userdomain.co.za/nginx.conf_*;

}

[email protected]:~# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[email protected]:~# apachectl configtest
Syntax OK
[email protected]:~#
[email protected]:~#

Doug,

you wrote

Logged in with admin account, created a user account, logged in with user account, added a domain (which was already pointed to the server IP) but the same issue persists.

If you created a new user USERNAME and created a new DOMAIN.TLD. then your configs should go into

/home/USERNAME/conf/web/DOMAIN.TLD/

when looking at your apache2 and nginx config files, they all point to /home/admin/ instead of /home/USERNAME/

can you adjust the configs and file locations and give this another go?

-Dennis

1 Like

apache

<VirtualHost 111.111.111.111:8080>

ServerName userdomain.co.za

ServerAdmin [email protected]
DocumentRoot /home/radman/web/userdomain.co.za/public_html
ScriptAlias /cgi-bin/ /home/radman/web/userdomain.co.za/cgi-bin/
Alias /vstats/ /home/radman/web/userdomain.co.za/stats/
Alias /error/ /home/radman/web/userdomain.co.za/document_errors/
#SuexecUserGroup radman radman
CustomLog /var/log/apache2/domains/userdomain.co.za.bytes bytes
CustomLog /var/log/apache2/domains/userdomain.co.za.log combined
ErrorLog /var/log/apache2/domains/userdomain.co.za.error.log

IncludeOptional /home/radman/conf/web/userdomain.co.za/apache2.forcessl.conf*

<Directory /home/radman/web/userdomain.co.za/stats>
    AllowOverride All
</Directory>
<Directory /home/radman/web/userdomain.co.za/public_html>
    AllowOverride All
    Options +Includes -Indexes +ExecCGI
</Directory>

<FilesMatch \.php$>
    SetHandler "proxy:unix:/run/php/php7.4-fpm-userdomain.co.za.sock|fcgi://localhost"
</FilesMatch>
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

IncludeOptional /home/radman/conf/web/userdomain.co.za/apache2.conf_*

nginx

server {
listen 111.111.111.111:80;
server_name userdomain.co.za ;

include /home/radman/conf/web/userdomain.co.za/nginx.forcessl.conf*;

location / {
    proxy_pass      http://111.111.111.111:8080;
    location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|exe|pdf|doc|xls|ppt|txt|odt|ods|odp|odf|tar|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
        root           /home/radman/web/userdomain.co.za/public_html;
        access_log     /var/log/apache2/domains/userdomain.co.za.log combined;
        access_log     /var/log/apache2/domains/userdomain.co.za.bytes bytes;
        expires        max;
        try_files      $uri @fallback;
    }
}

location /error/ {
    alias   /home/radman/web/userdomain.co.za/document_errors/;
}

location @fallback {
    proxy_pass      http://111.111.111.111:8080;
}

location ~ /\.ht    {return 404;}
location ~ /\.svn/  {return 404;}
location ~ /\.git/  {return 404;}
location ~ /\.hg/   {return 404;}
location ~ /\.bzr/  {return 404;}

include /home/radman/conf/web/userdomain.co.za/nginx.conf_*;

}

drwxr-x–x 2 radman www-data 4096 Feb 9 21:45 public_html

This can be marked as resolved. Doug was hitting www.domain.tfd but domain was set up without www.

adding www to the Aliases solved the issue

image

Hestia sees xxxx.co.uk or xxx.co.za and so on by default as an subdomain and doesn’t add the www by default.

So the problem was solved by @dennis.bradenton it appears HestiaCP does not automatically add the www alias on your domain while setting up a new website like VestaCP used to do.

Adding the www into the aliases field in the control panel solved the issue and everything seems to be up and running now.

www.domain.com

Will carry on testing. This HestiaCP is quite an upgrade from VestaCP looking forward to pushing it into production.

Special thanks again to @dennis.bradenton and all in this thread.

Ha beat me to the post update.

1 Like