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!

how to allow_url_fopen off global but allow single Override ?

Discussion in 'General Discussion' started by elcangri, Mar 16, 2011.

  1. elcangri

    elcangri Registered

    Mar 15, 2011
    Likes Received:
    Trophy Points:
    Hello everyone,

    On my old hosting account the technicians helped me with this option after I asked if 1 url could be allowed since they have allow_url_fopen off by default for shared hosting.
    Now I own a vsp and I could set allow_url_fopen on , but for security I would like to leave this off and just enable it for 1 url.
    Can anyone please help me do so ?


  2. madaboutlinux

    madaboutlinux Well-Known Member

    Jan 24, 2005
    Likes Received:
    Trophy Points:
    If you have already turned off allow_url_fopen server wide, here is the way to turn it ON for a domain.
    SSH to your server and goto /usr/local/apache/conf/ directory, see if you have a "userdata" directory? If no, create the "userdata/std/2/<username>/<domain.tld>/<username.conf>" directories inside the "conf" directory. The complete path should look like the following


    Replace username and domain.tld with actual values.

    Add the following to the <username>.conf file

    Now, edit the apache config file /usr/local/apache/conf/httpd.conf and search the VirtualHost entry of that domain and include the path of the above created file in it. For example,

    Save the file and rebuild the apache configuration.

    This should enable allow_url_fopen for that domain.
    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