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!

Add commands to a VirtualHost

Discussion in 'General Discussion' started by jnetsurfer, Nov 20, 2007.

  1. jnetsurfer

    jnetsurfer Member

    Joined:
    Feb 20, 2004
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    151
    Hello,

    How can I add commands to a <VirtualHost> section in httpd.conf without them being overwritten by cPanel? Nothing I've found seems to answer this question. Thanks!

    -Josh
     
  2. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Planet Earth
    I believe that you want to add additional parameters/attributes to VirtualHost section. If this is the case, then you can edit the VirtualHost template and all new domains will have those parameters/attributes.The virtualhost templates are present at /usr/local/cpanel/etc/httptemplates (I'm not near any cPanel box so the folder may be somewhat misspelled)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jbreck

    jbreck Member
    PartnerNOC

    Joined:
    Mar 7, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    I'm having a devil of a time figuring out to to add a wildcard ServerAlias line to the templates. Can someone here put a code snippet of how it's done? I've tried a few different ways, but evidently I'm not doing it right.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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