My Plesk server main public IP on Centos 7 is 10.10.10.10 and there is also another dedicated IP assigned to a subscription domains e.g. 20.20.20.20. All websites and DNS settings are working fine, but PHP and other APIs showing server's main public IP instead of domains (Subscriptions) IP, so the requests from websites are not authorized on IP limited services and actually the output IP of websites requests are wrong. I am using this code to get the IP.
Thank you.
Plesk returns server's IP instead of subscription's IP
Thank you.
PHP:
<?php
// create a...