Plesk for Windows
Plesk for Linux
kb: how-to
ABT: Group A
Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to change Default Server Page for domains in disabled status?
Answer
Note: The default server page is shown in case if the domain is disabled or the server's IP address is specified in the address bar and "Customize Plesk URL" is not active with "All domains and subdomains that resolve to the server IP address but are not used for hosting" option.
To enable default server page:
- Log in to Plesk
- Go to Tools & Settings > IP Addresses and click the IP address to edit its settings.
- Set
Default site
option toNone
To customize the default page:
- Log in to Plesk server via SSH or RDP
- Edit or replace the file
/var/www/vhosts/default/htdocs/index.html
(Plesk for Linux) or%plesk_vhosts%default\htdocs\index.html
(Plesk for Windows).
Warning: it's not recommended to place index.php to default web server website document root as it may break Plesk installation
Comments
9 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?
Hi,
I want change single domain PHP version in command line. Could you please help how to change php version in command line in single domain
We have using plesk linux
@hostnamaste
Hi,
You can do it with help of this command:
fastcgi - ID of the corresponding PHP handler. You can get the list of all of the available PHP handlers IDs on your server with this command:
Please sign in to leave a comment.