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 edit virtualhost of a domain in WHM?

Discussion in 'General Discussion' started by postcd, May 3, 2014.

Thread Status:
Not open for further replies.
  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    624
    Likes Received:
    6
    Trophy Points:
    18
    Hello,

    my aim is to allow shell_exec for one domain or one account.
    adding directive into php.ini did not worked (which is good for security)
    but whn removed shell_exec from disabled function in WHM PHP config. editor, the website still not work and shows its disabled..

    So i found these guides:
    http://www.linuxwindowsmaster.com/how-to-enable-php-function-for-one-account/
    How to Enable shell_exec function for one account?
    http://forums.cpanel.net/f5/enable-shell_exec-one-user-109601.html#post588281

    they mention need to edit Virtual host of a domain, but im not able to find it via WHM nor via command line.

    This folder contains not all domains folders, only a few:
    /usr/local/apache/conf/userdata/std/2/

    Please where i can (preferrably from WHM) edit certain domain virtual host file?
     
    #1 postcd, May 3, 2014
    Last edited: May 3, 2014
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You may also want to let us know why exactly "shell_exec" is required in this situation. There may be alternatives to enabling this function that we can provide information about.

    Thank you.
     
  4. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    624
    Likes Received:
    6
    Trophy Points:
    18
    Yes, i have CGI, Apache SuExec, php5. I already tried to set disallowed functions php variable to be empty in the client domain php.ini but it did not disabled "exec" not shell_exec as i typed) I veriffied calling it from test .php file and it failed being disallowed. Any idea why protection was not disabled please?
     
    #4 postcd, May 5, 2014
    Last edited: May 5, 2014
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  6. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    624
    Likes Received:
    6
    Trophy Points:
    18
    Where is virtual section of the domain?

    Need to enable php function for one cpanel account. Strange i cant do this via WHM simply?

    here is some tutorial. http://forums.cpanel.net/f5/enable-shell_exec-one-user-109601.html#post588281

    The only thing i dont understand is where is that virtual section of a domain?!


    There i have only 4 account folders, even i have much more accounts on server: /usr/local/apache/conf/userdata/std/2
     
  7. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    624
    Likes Received:
    6
    Trophy Points:
    18
    I already read and dont understand above mentioned configuration. Please read my previous post.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Please note the following part of the document:

    Thank you.
     
  9. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    624
    Likes Received:
    6
    Trophy Points:
    18
    I dont know which structures and why.
     
  10. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    624
    Likes Received:
    6
    Trophy Points:
    18
    It just dont works. tutorial says:
    "Apache 2.2 without SSL — /usr/local/apache/conf/userdata/std/2_2/$user/$domain/$includename.conf"

    php -v returns "Apache/2.2.27"

    i have conf file in proper user folder , tried both /2/ and /2_2/ but none makes the function enabled after httpd restart
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I see you have opened another thread for assistance with this issue. I am closing this one to avoid duplicate discussions on the same topic.

    Thank you.
     
Loading...
Thread Status:
Not open for further replies.

Share This Page