1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Plesk WWW prefix autocreator script

Discussion in 'Plesk for Linux - 8.x and Older' started by Cameleon, Nov 4, 2008.

  1. Cameleon

    Cameleon Guest

    0
     
    This is subdomain prefix - automatic creation

    If someone want to make life easy, i dont know only how to add DNS from command line like this

    Event handler in plesk

    Subdomain created
    Command: /usr/local/psa/bin/create_subdomain.sh <new_subdomain_name> <new_domain_name>

    normal 50

    Subdomain deleted
    Command: usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<new_domain_name>

    normal 50

    content of file wich need to be in /usr/local/psa/bin/ create_subdomain.sh

    #!/bin/bash

    echo "ServerAlias www.$1.$2" >> /var/www/vhosts/$2/subdomains/$1/conf/vhost.conf

    /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=$2

    exit
     
  2. Cameleon

    Cameleon Guest

    0
     
    question: Normal subdomain dns zone is added wheen i create subdomain but it looks like this
    test.mysite.pl. A IPP.IPP.IPP.IPP
    i need to add one more like this
    *.test.mysite.pl. A IPP.IPP.IPP.IPP
    by auto or by script or anyhow, not by hand....
     
Loading...