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.

httpd.conf vhost templates

Discussion in 'General Discussion' started by mserver, Feb 12, 2006.

  1. mserver

    mserver Registered

    Joined:
    Dec 20, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    How can i modify the packages vhost templates ?

    I would like to add some specific lines into the httpd.conf vhost templates, only for 1 cpanel package, when a new account is created.

    Thank you.
     
  2. 24x7team

    24x7team Well-Known Member

    Joined:
    Jan 16, 2006
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    really tough to find
    If it is just one account, then rather playing with the stuff, open the httpd.conf on the server and search the VirtualHost entry for that specific domain and add the entries....

    Simple!!!
     
  3. WestBend

    WestBend Well-Known Member

    Joined:
    Oct 12, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
    I wouldnt mind knowing this either.. There are a few defaults I would like to add to the vhost template.
     
  4. ShockHosts

    ShockHosts Well-Known Member

    Joined:
    Nov 25, 2005
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    I don't really understand.. But when I edit accounts I go into httpd.conf... There you can change some basics.
     
  5. WestBend

    WestBend Well-Known Member

    Joined:
    Oct 12, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
    No point in going in there everytime you add an account to add the same old commands. Therefore it would be nice to edit the template.
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yes, you can edit the virtualhost templates. There are two, one for SSL and one for non-SSL:

    /usr/local/cpanel/etc/httptemplates/apache1/ssldefault
    /usr/local/cpanel/etc/httptemplates/apache1/default


    Changes to those will obviously only be applied to new entries and you should watch the files incase cPanel overwrites them with an update.
     
  7. mserver

    mserver Registered

    Joined:
    Dec 20, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks ! it's exactly what i was looking for.

    Is there any way to have a different template per Cpanel package ? (1 package = 1 vhost template) ?
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    AFAIK, no - you'd have to code that yourself. You'd have to go through /scripts/wwwacct where those templates are used and modify how they're used to make them package specific. Then watch out for changes to wwwacct when upcp runs using PWSOwner's script.
     
  9. mserver

    mserver Registered

    Joined:
    Dec 20, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I need to add some lines only for 1 package.
    The other packages will have the default vhost template.
    Could you code such a script ?
    Feel free to send me a pricing : jf.schmit |at| gmail.com

    Thank you.
     
  10. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  11. MWMcons

    MWMcons Member

    Joined:
    May 28, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Hey Chirpy,

    Is there a way to prevent cPanel from overwriting those default and ssldefault template files every time it performs and update? All of my manual modifications keep getting overwritten.

    Thx in advance.

    - MWM
     
Loading...

Share This Page