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.

VirtualHost skeleton?

Discussion in 'General Discussion' started by eger, May 11, 2005.

  1. eger

    eger Well-Known Member

    Joined:
    Feb 28, 2003
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    Was wondering if there is a way to modify the way cPanel creates the virtual hosts in httpd.conf. I'm looking to change the default ServerAlias from www.domain.com domain.com to www.domain.com domain.comf *.domain.com

    Is this possible? Was looking for the script that creates the VirtualHost in httpd.conf. But I can't seem to find it in /scripts/

    Thanks!
     
  2. challii

    challii Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    Have you tried modifying the default Zone templates and seeing is that helps?
     
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    The wwwacct script writes the httpd.conf entry when an account is created. It's around line 950 where it starts doing that. If you modify the wwwacct script, you may want to use my watchwwwacct script.
     
  4. eger

    eger Well-Known Member

    Joined:
    Feb 28, 2003
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    Ah thannks squirrel. I found it shortly before your post by going into the scripts dir and doing grep ServerAlias *.

    Now I would be guessing that an update would overwrite my changes back to the original. Is that what your custom script prevents? If so I would love to take a look at it!

    Thanks again!
     
  5. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    You can find my scripts link in my sig. Cpanel upgrades always rewrite the wwwacct script, but usually the same as before. The watchwwwacct script will put back your changes in that case, and if cpanel did change it, the script will tell you where it was modified.
     
Loading...

Share This Page