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 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:
    694
    Likes Received:
    15
    Trophy Points:
    68
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 postcd, May 3, 2014
    Last edited: May 3, 2014
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    29
    Trophy Points:
    178
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,822
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    694
    Likes Received:
    15
    Trophy Points:
    68
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #4 postcd, May 5, 2014
    Last edited: May 5, 2014
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,822
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    694
    Likes Received:
    15
    Trophy Points:
    68
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,822
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    694
    Likes Received:
    15
    Trophy Points:
    68
    I already read and dont understand above mentioned configuration. Please read my previous post.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,822
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Please note the following part of the document:

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    694
    Likes Received:
    15
    Trophy Points:
    68
    I dont know which structures and why.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    694
    Likes Received:
    15
    Trophy Points:
    68
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,822
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...
Thread Status:
Not open for further replies.

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