API - How to create a domain with another version of PHP

Discussion in 'General' started by martinhe, Aug 2, 2019.

  1. martinhe

    martinhe New Member

    Hi, can the API even create a website with a specific version of PHP? I need to put parameters in the API so that the web can be set up with PHP: fast_cgi and version rh-php-7.1.

    [​IMG]
    [​IMG]

    Secondary question: How do I choose a site ID when creating it via the API?
    $paramsDomena = array(
    'server_id' => 1,
    'domain_id' => 34, //create /var/www/clients/client34/web34/
    ....);

    Thank you all for your help and tips.
     
  2. martinhe

    martinhe New Member

    Bumped. Please help me.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Create a domain in the ISPConfig UI, then take a look at the database, web_domain table, to see how the created record looks like and then adjust the parameters in the params array of your API call accordingly.
     
    martinhe likes this.
  4. martinhe

    martinhe New Member

    Worked for me, very thanks you. :)

    Solution:
    $paramsDomain = array(
    'domain_id' => '1111', // i choose own ID
    'php' => 'fast-cgi',
    'fastcgi_php_version' => 'rh-php-7.1:/opt/rh/rh-php71/root/usr/bin/php-cgi :/opt/rh/rh-php71/register.content/etc/opt/rh/rh-php71/php.ini'
    );
     

Share This Page