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!

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:
    151
    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:
    156
    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!!!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. WestBend

    WestBend Well-Known Member

    Joined:
    Oct 12, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    166
    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:
    166
    I don't really understand.. But when I edit accounts I go into httpd.conf... There you can change some basics.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. WestBend

    WestBend Well-Known Member

    Joined:
    Oct 12, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    166
    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,460
    Likes Received:
    22
    Trophy Points:
    463
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. mserver

    mserver Registered

    Joined:
    Dec 20, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    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,460
    Likes Received:
    22
    Trophy Points:
    463
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. mserver

    mserver Registered

    Joined:
    Dec 20, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    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,798
    Likes Received:
    131
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
  11. MWMcons

    MWMcons Member

    Joined:
    May 28, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    51
    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

  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