The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

    Joined:
    Mar 15, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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 ?

    Regards

    Elcangri
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    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

    /usr/local/apache/conf/userdata/std/2/<username>/<domain.tld>/<username>.conf

    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.
     
Loading...

Share This Page