Applicable to:
- Plesk 12.5 for Linux
- Plesk 12.5 for Windows
Question
How to change Default Server Page for domains in disabled status?
Answer
The default server page is shown in case if domain is disabled and if the server's IP address is specified in address bar.
By default, this page is defined by the file /var/www/vhosts/default/htdocs/index.html
To make it work, set Default site
option to
None
for required IP address in Tools & Settings > IP Addresses.
In order to configure index.php as default server page, follow instructions from article:
How to execute PHP files on default web server page?
WARNING: it's not recommended to place index.php to default web server website document root at /var/www/vhosts/default/htdocs as it may break Plesk installation
Comments
7 comments
How can add support php in /var/www/vhosts/default/htdocs/
Hello, Luis
Plesk does not have such functionality at the moment, however, you can suggest php support for the Default Server Page by referring to the following link: https://plesk.uservoice.com/forums/184549-feature-suggestions
The top-ranked suggestions are likely to be included in the next versions of Plesk.
The comment about php support is important. My case was...
I wanted to change the default behaviour of the default site to redirect to another site, and so I renamed the default <index.html> to <index.html.old> and dropped in a .php file. This lead me quickly discovering php wasn't supported for the default site, so...
I created a small <index.html> to use a META REFRESH plus a JavaScript window.location.replace to do the same job and removed the index.php, BUT... the default site continued try and serve <index.php>, so I was left with either:
Even if I explicitly requested /index.html, the default site INSISTED on trying to serve <index.php> with one of the above outcomes depending on whether the file existed or not.
Is this caching by nginx causing the problem? I cured it by creating a subscription in the name of the default site, but I can't understand why the server be 'fixated' on serving <index.php> even when the file no longer existing and there was an <index.html>. Not even the original default <index.html> would work...only one of the two error in trying to serve <index.php>!
@Lain Could you provide the OS and Plesk version details?
Hi @Alexander
Version 17.5.3 Update #43, last updated on Mar 11, 2018 04:30 PM
Hi Lain, I have reproduced this behavior on a test server and discussed it with the developers. It is not recommended to replace default index.html with index.php at /var/www/vhosts/default/htdocs as we cannot guarantee Plesk functionality in that case. I have updated the article.
Strange that using a php page as the default server page should cause problems with the Plesk instalation. It's not as if it does much other than say it's a default page on a Plesk machine.
I presume you can change the html without causing Plesk problems?
Please sign in to leave a comment.