Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

forcing php script to run with dedicated IP

Discussion in 'General Discussion' started by BigLebowski, Jul 6, 2011.

  1. BigLebowski

    BigLebowski Well-Known Member

    Dec 24, 2007
    Likes Received:
    Trophy Points:
    Hi there

    In WHM, I created a test account called "" 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?

  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Oct 2, 2010
    Likes Received:
    Trophy Points:
    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.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice