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.

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:
    1
    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:
    2
    Trophy Points:
    18
    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)
     
  3. jbreck

    jbreck Member
    PartnerNOC

    Joined:
    Mar 7, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
Loading...

Share This Page