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.

customize apache's default virtual host

Discussion in 'EasyApache' started by deviancelabs, Sep 11, 2009.

  1. deviancelabs

    deviancelabs Registered

    Joined:
    Sep 28, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bucharest, Romania
    I was wondering if anyone has any idea on how to edit/customize the default virtual host definition?

    According to the EA3 docs, one way would be to use the include files but since this particular vhost contains no "Include" definition, that doesn't seem to be an option.

    Adding either the "Include" definition or the custom directives directly to the httpd.conf file, within the virtual host definition, and using the apache_conf_distiller + rebuildhttpdconf doesn't work either as the changes aren't preserved (even though the datastore gets updated).

    One last option that I haven't tried yet would be to use a custom template file but I'm not sure it will work either.

    So has anyone had any success with this?

    Thanks.
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
  3. deviancelabs

    deviancelabs Registered

    Joined:
    Sep 28, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bucharest, Romania
    Thanks a lot for the reply.
    As I said in my initial post, that was one last option that I haven't tried and I was curious if anyone has done this and can report that it works.

    Did you make this work, btw ?
     
  4. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    I'm in the same boat. I just want to create a VirtualHost entry for the hostname of the server itself, so that it serves up pages in /usr/local/apache/htdocs

    Something like:

    <VirtualHost 11.22.33.44:80>
    ServerName boxname.hostingcompany.com
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin sysadmin@hostingcompany.com
    </VirtualHost>

    I tried to add this directly to httpd.conf, then distill and rebuild, and the change is lost.

    Ideas on the RIGHT way to do this?

    - Scott
     
Loading...
Similar Threads - customize apache's default
  1. clusters
    Replies:
    3
    Views:
    295

Share This Page