How to change the Web Server's Default Page for domains with no hosting and in disabled status in Plesk

Follow

Comments

10 comments

  • Avatar
    Luis Zubeldia

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

    2
    Comment actions Permalink
  • 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.

    1
    Comment actions Permalink
  • Avatar
    Iain Hunneybell

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

    1
    Comment actions Permalink
  • Avatar
    Alexander Tsmokalyuk

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

    1
    Comment actions Permalink
  • Avatar
    Iain Hunneybell

    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
    1
    Comment actions Permalink
  • 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.

    1
    Comment actions Permalink
  • Avatar
    Iain Hunneybell

    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?

    1
    Comment actions Permalink
  • Avatar
    hostnamaste

    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

    1
    Comment actions Permalink
  • Avatar
    Bulat Tsydenov

    @hostnamaste

    Hi,

    You can do it with help of this command:

    plesk bin site -u example.com -php_handler_id fastcgi

    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:

    plesk bin php_handler --list
    1
    Comment actions Permalink
  • Avatar
    georges jean-denis

    " Warning: it's not recommended to place index.php to default web server website document root as it may break Plesk installation "

    Why not?

    This article was somewhat useful, however, it could have been much better. I would have loved to find out why it's not permitted to have index.php as the default page, OR RATHER, I would have loved to find out HOW TO CONFIGURE the default HTTP PAGE ( not the https one ).

    This article fails to point out that there can be 2 different default webpages, one in htdocs, and the other in httpsdocs. OR RATHER, the article fails to mention that the possibility even exists. Am I missing something? Isn't Plesk trying to help people who use it on a regular/semi-regular basis???

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request