• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Change PHP settings for subdomain (IP issue on primary domain)

kneidels

New Pleskian
Hi there

i am trying to update PHP settings for dev.domain.co.il on my VPS (the primary domain domain.co.il is also on the VPS - they are on the same subscription)

and its giving me an error:

"Error: Error: Failed to update the IP address. Addon domains cannot be assigned an IP address not assigned to the main domain of the subscription. "

The primary domain (domain.co.il) has a dedicated IP
i dont really need the subdomain on this same dedicated IP, but on plesk, it seems they are managed together on the same IP and cannot be separated.

i have tried rereading the server IPs, i have tried re-saving the primary domain IP, but i still keep getting this error for the subdomain PHP setting, even though its clear that the sub and primary domains are on the same IP.

Can you help?

Thanks
 
Looks like database inconsistency. Try to do following in Plesk database:

  1. Find the subdomain id using the following query:
    select id,name from domains where name="sub.example.com";
    +----+-----------------+
    | id | name |
    +----+-----------------+
    | 7 | sub.example.com |
    +----+-----------------+
  2. Find the id of the required IP address (from Plesk > Domains > sub.example.com > Web Hosting Access):
    select id,ip_address from ip_addresses where ip_address="203.0.113.2";
    +----+--------------+
    | id | ip_address |
    +----+--------------+
    | 1 | 203.0.113.2 |
    +----+--------------+
  3. Find the ipCollectionId which belongs to the subdomain:
    select dom_id,ipCollectionId from DomainServices where dom_id=7;
    +--------+----------------+
    | dom_id | ipCollectionId |
    +--------+----------------+
    | 7 | 16 |
    +--------+----------------+
  4. Change the ipAddressId for the ipCollectionId:
    update IpAddressesCollections set ipAddressId=1 where ipCollectionId=16;
Note: ipAddressId from the 4 step should be used, ipCollectionId value should be used from the step 5.
 
Back
Top