• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Domain with servername always falls back to PLESK default page

matzem

New Pleskian
Hi,

i have a domain registered within PLESK having the same name as the server itself. After a short period of time the domain shows up the PLESK default page instead of the original content located in the vhost httpdocs directory.

To restore the content it's possible to deactivate and re-activate the domain from the customers control panel. But after an amount of time the default page comes back.

I've no idea what is causing this error, the configs look good to me.

I first recognized the error after the update to PLESK 12. Anyone with a similar problem or an idea of what's going on here?

Thanks guys.
 
I suppose that you have nginx as well running? And I suppose that your standard Plesk "index.html" is still located in "/var/www/vhosts/YOURDOMAIN.COM/httpdocs" ? And I suppose further more, that your "nginx.conf" ( or "nginx_ip_default.conf" ) is having the standard location definition like:
location ~ /$ {
index index.html index.cgi index.pl index.php index.xhtml index.htm index.shtml;
}

And last, I suppose that you have a "index.php" - file to start your domain-specific content?

Well... if all that is TRUE, I gave you a little hint with some colors in my quoted text, which might help you to understand a directory index. A webserver is always trying to serve the content, based on the first match of the directory index definition. If you would like a webserver to serve a different match, you have to define that.

In this case you have TWO index - files and the first match is being served.
Why not renaming the Plesk standard "index.html" to ".old.index.html" or "index.html.old" ( or you could as well delete the file, because there is no need to keep this file in the docroot ), so that the webserver ignores this file, while searching for an index - file?
You might as well change the standard location definition, so that a first match would be the "index.php" instead of the "index.html" ( "index index.php index.cgi index.pl index.html index.xhtml index.htm index.shtml;" ), but be aware, that changes at "/var/www/vhosts/system/YOURDOMAIN.COM/conf" could get overwritten with the default templates, when you reconfigure domains over Plesk, or if updates/upgrades/patches reconfigure your config - files with the default templates.


But you might ask as well, WHY the change happened from time to time? Sometimes webserver restart or reload because of failures, segfaults or because you tell them to restart. Then the standard configuration is loaded and this means as well, that the standard directory index reloads.
 
Hi UFHH01,

First, thank your for your kind and educative answer. I'm administering linux servers for more than 15 years. Most of them don't use PLESK and are configured manually. Therefore, I know the concept of directory indexing very well.

There is one server having PLESK that is showing the strange behavior described in my initial post. It is running on apache 2.2.15. As i already mentioned, the problem appears after updating to PLESK 12. It doesn't load the PLESK default page caused by wrong index setting. There is only one index.php within the vhost directory. Apache simply points to the wrong directory, which is the default one if you access the server by its IP address. I thought about redirecting from there to the domain directory but this will a) point all access without vhost to this domain b) not satisfy me as i would like to figure out what's wrong.

Thank you anyway very much. Maybe anyone else already experience that problem?
- matzem
 
Back
Top