forcing php script to run with dedicated IP

BigLebowski

Well-Known Member
Dec 24, 2007
75
0
56
Hi there

In WHM, I created a test account called "test.com" which I assigned a unique IP(ip manager). I also fitted a self-signed certificate to it.

I have a php script in the account which makes http "GET" requests to a remote website. These requests are still being made from the main shared server IP, instead of from the new dedicated IP.

I am running SuPHP. The scripts are running as the user (and not "nobody") but the IP is still not dedicated.

Any thoughts please?

Cheers
Dude
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
The script has to be written to use a different IP, since outgoing traffic will utilize the server's main IP unless the script has been written to use another IP.

The dedicated IP on an account is used for incoming connections. Now, if a connection has already been established, then a dedicated IP will be used for outgoing connections at that point.

Both the incoming and outgoing connections must be told which IP to use, which needs to be in the script in question. There isn't any way in Apache or the network to automate this, it has to be in the script that is trying to send the outgoing request.