How to change the default index for all websites on Plesk

Follow

Comments

6 comments

  • Avatar
    Faris Raouf

    This is really helpful. I'd like to make some suggestions please:

    For item 3, users who are not familiar with Event Handler may wonder which priority to use. Maybe it could be suggested that the default priority should be used.

    For item 4, again new users may be confused. I would assume only the root user would have the correct permissions to run the "subscription" command. But if there is a better user to select, maybe you could add an appropriate suggestion?

     

     

    0
    Comment actions Permalink
  • Avatar
    Denis Bykov

    @Albert Stienen

    What exact error do you see?
    Please note that Powershell should be used and not the default Command Prompt.

    0
    Comment actions Permalink
  • Avatar
    Steven Craig

    How do you do this for windows plesk?

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov (Edited )

    Hello @Albert,

    Thank you for paying our attention.
    The article was reworked.

    According to IIS documentation, there is no way to change the priority of existing file via command line. If it is necessary to change the priority of such a file, it should be configured manually in IIS > hostname > Sites > example.com > Default Documents.

    A new file can be added to the top of the list using the following script:
    plesk bin site -l | % { if ( $ ) { &$env:windir\system32\inetsrv\appcmd.exe set config $ /section:defaultDocument /enabled:true /+files.[value=`'test.php`'] } }

    0
    Comment actions Permalink
  • Avatar
    Artyom Baranov

    @Faris Hi!

    Thank you for the feedback. 

    > For item 3, users who are not familiar with Event Handler may wonder which priority to use. Maybe it could be suggested that the default priority should be used.

    Its hard to say for sure, how many handlers already exist and recommending to set the default (lowest) priority can lead to incorrect behavior.

    > For item 4, again new users may be confused. I would assume only the root user would have the correct permissions to run the "subscription" command

    I have updated the article according your recommendation. Thanks again :)

    0
    Comment actions Permalink
  • Avatar
    Alexander Tsmokalyuk

    @Steven A solution for Windows was added

    -1
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request