Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2003
    Location
    Bucharest, Romania
    Posts
    4

    Default customize apache's default virtual host

    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. #2
    Member
    Join Date
    May 2008
    Posts
    1,114

    Default

    You can try to use custom template option to customize apache default virtual host. You can get the information from the below URL:

    cPanel - The Easy Apache Configuration System - Adding Custom Directives to httpd.conf

  3. #3
    Registered User
    Join Date
    Sep 2003
    Location
    Bucharest, Romania
    Posts
    4

    Default

    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. #4
    Member sneader's Avatar
    Join Date
    Aug 2003
    Location
    La Crosse, WI
    Posts
    894
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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

Similar Threads & Tags
Similar threads

  1. Edit Apache directives for a virtual host
    By milindras in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 02-10-2011, 12:24 PM
  2. cpanel apache virtual host
    By liang3391 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-05-2009, 02:51 AM
  3. Dedicated IP address default virtual host
    By xous in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-08-2008, 08:52 PM
  4. Apache 2... Virtual Host
    By jaymc in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-05-2006, 01:22 PM
  5. change Default Virtual Host entry
    By ryantechsupport in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-04-2005, 03:17 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube