Results 1 to 3 of 3

Thread: Plesk Panel - Suspend Account with notification web page - SOLVED

  1. #1
    Kilo Poster
    Join Date
    Sep 2011
    Location
    Blaine, MN
    Posts
    18

    Default Plesk Panel - Suspend Account with notification web page - SOLVED

    I ran into the problem of having to suspend an a customers account and then noticed that after suspension it showed the default new site page from server doc root.

    Next I noticed there was no way to set a default page for suspended domains so I wrote a script that can be run and will edit the .htaccess file for the root htdoc of the server and add rewrite rules to point to suspended.htm. This will also query the PSA DB and create rewrite rules for any domain aliases for that domain as well.

    Just run this script after suspending domain and verify redirect by trying to access suspended domain.

    Edit "suspend.html" to say whatever you want.

    Feel free to let me know if there are any issues or suggestions for this, or feel free to modify as needed.

    Files:
    gensusp.php (run via "php -q gensusp.php suspendDomain.com /path/to/server/root/.htaccess")
    psadb.inc (psa db connectivity to query for domain aliases. if your mysql username is NOT "admin" then edit this file)
    suspend.html (this should be placed in the same directory as the index.html file for the default server root, usually: /var/www/vhosts/default/htdocs/)

    Feedback would be greatly appreciated.

    Thanks,
    J

    PS: if you re-enable the account you will need to manually remove those rules (which are well commented) from the server root's .htaccess file.
    Attached Files Attached Files
    Last edited by GothicJB; Dec 15, 2011 at 06:33 PM.



  2. #2

    Default

    Great feature and i good work !
    Any idea to make an automatisation ? (For deleting htaccess lines feature ?)
    Thanks, i will give it a try ;)

    But i don't understand this : "root htdocs htaccess" ?

    MoreOver:

    PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
    PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
    Last edited by SébastienR; Dec 16, 2011 at 08:08 PM.



  3. #3

    Default

    Thank you, could you please provide a little more detail? where do I upload the php file too?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •