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

Enable CGI bulk

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by vincenzot, Dec 16, 2010.

  1. vincenzot

    vincenzot Regular Pleskian

    22
    40%
    Joined:
    Jul 3, 2009
    Messages:
    104
    Likes Received:
    0
    Hello,

    I have an serius problem, I must add cgi extension for all domains/subdomains (for all customers) in my server .. but I have 400 domains and about 300 customers ... how I can do it into plesk database for do an bulk change without edit it once for once?

    It is very important.

    I wait your answer

    Bye
     
  2. vincenzot

    vincenzot Regular Pleskian

    22
    40%
    Joined:
    Jul 3, 2009
    Messages:
    104
    Likes Received:
    0
    I have try this:

    mysql -uadmin -p` cat /etc/psa/.psa.shadow` -Dpsa -e"update subdomains set cgi =true;"
    mysql -uadmin -p` cat /etc/psa/.psa.shadow` -Dpsa -e"update web_users set cgi = true;"
    mysql -uadmin -p` cat /etc/psa/.psa.shadow` -Dpsa -e"update hosting set cgi = true"

    But don't work, how I can do it? I don't want change manually each domains :S
     
  3. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    You can write script for mass domain update with /usr/local/psa/bin/domain utility and '-cgi true' option.
     
  4. vincenzot

    vincenzot Regular Pleskian

    22
    40%
    Joined:
    Jul 3, 2009
    Messages:
    104
    Likes Received:
    0
    Hello

    I have do this

    [root@plesk ~]# /usr/local/psa/bin/domain -cgi true
    Unknown command: "-cgi"

    How it work?

    With this command I edit too web_user subdomains and domains?
     
  5. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    Did you try to read documentation for this utility?
    Try to do it with

    # /usr/local/psa/bin/domain --help
     
  6. vincenzot

    vincenzot Regular Pleskian

    22
    40%
    Joined:
    Jul 3, 2009
    Messages:
    104
    Likes Received:
    0
    Hello yes I have see how it works now

    /usr/local/psa/bin/domain -u domain.tld -cgi true

    But this command change only the master setting (www.) and for change too all subdomains? I have many site that it have 10 15 subdomains, exist any utlity for do this for all subdomains web_users and domains?

    So it is possible to edit it inside psa database?
     
  7. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    # /usr/local/psa/bin/subdomain --help
     
  8. vincenzot

    vincenzot Regular Pleskian

    22
    40%
    Joined:
    Jul 3, 2009
    Messages:
    104
    Likes Received:
    0
    Thanks, any method from do it directly psa database from update command?
     
  9. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    You need to extract domains and subdomains names from database with something like

    select name from domains;

    and

    select name,dom_id from subdomains;

    dom_id you can change to domains name from domains table with corresponding SQL query.
    After that use these names for script with mentioned command line utilities.
     
  10. vincenzot

    vincenzot Regular Pleskian

    22
    40%
    Joined:
    Jul 3, 2009
    Messages:
    104
    Likes Received:
    0
    Thanks you :)
     
  11. vincenzot

    vincenzot Regular Pleskian

    22
    40%
    Joined:
    Jul 3, 2009
    Messages:
    104
    Likes Received:
    0
    Hello,

    for select all webuser from db how I can do it?
     
  12. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    select * from web_users;
     
Loading...