How to change Default Server Page for domains in disabled status

Follow

Comments

7 comments

  • Avatar
    Luis Zubeldia

    How can add support php in /var/www/vhosts/default/htdocs/

  • Avatar
    Artyom Baranov

    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.

  • Avatar
    Iain

    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:

    1. 404 becasue I'd rememved <index.php>, or
    2. Being asked if I wanted to save/download the <index.php> (if I put it back) as the box wasn't parsing the file

    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>!

  • Avatar
    Alexander Tsmokalyuk

    @Lain  Could you provide the OS and Plesk version details?

  • Avatar
    Iain

    Hi @Alexander

    OS CentOS Linux 7.4.1708 (Core)
    Product Plesk Onyx
    Version 17.5.3 Update #43, last updated on Mar 11, 2018 04:30 PM
  • Avatar
    Alexander Tsmokalyuk

    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.

  • Avatar
    Iain

    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.

Have more questions? Submit a request