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.

EasyApache 3 and custom VirtualHost form the start

Discussion in 'cPanel Developers' started by argintxe2, Nov 15, 2007.

  1. argintxe2

    argintxe2 Member

    Joined:
    Jun 17, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    The last 2 years we've had a custom Apache setup to run PHP as FastCGI. This setup requires an additional ScriptAlias on ALL virtualhosts. We added this ScriptAlias thanks to the, until now, simple cPanel httptemplates.

    Now, with EasyApache 3, the whole system is a lot more complex. How should we add now this custom ScriptAlias to all VirtualHosts? This ScriptAlias should automatically be added when creating the virtualhosts (ie: new account, new add domain or new subdomain).

    I've tried using /usr/local/apache/conf/userdata and a custom postwwacct . This solution it's ok for new accounts but not for new subdomains or addon domains.

    I've tried to understand the new templating system ( /var/cpanel/templates ) but I am absolutly unable to do so. It doesn't work. I've finally setup the same system we've until now using custom templates located in /usr/local/cpanel/etc/httptemplates ( which means I've to monitor for changes on cpanel/Apache updates ).

    Questions:

    * Any suggestion to solve this issue?
    * Is there any way to create new /var/cpanel/userdata from the running httpd.conf file? I've tried to "/usr/local/cpanel/bin/userdata_update --reset" but this has created incorrect userdata.

    I'm really lost. I've been 3 days trying to find a solution....

    I'll really appreciate any help. Many thanks.

    (Excuse me my english, it's my third language)
     
  2. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    4
    Trophy Points:
    18
    Hello,

    Easyapache 3 uses a new config system called Cpanel::AdvConfig.

    How that works with httpd.conf is outlined here:

    http://cpanel.net//support/docs/ea/ea3/ea3_understanding.html

    http://cpanel.net//support/docs/ea/ea3/faq_ea3.html

    really, these are a bit of a misnomer as the URLs are under easyapache but in reality Cpanel::AdvConfig is the underlying tools to manage httpd.conf in ea3 as well as WHM, Cpanel, etc, so understanding it will help understand how to work with it, whether that is how its used during an easyapache build, or adding an account, etc.

    HTH!
     
  3. argintxe2

    argintxe2 Member

    Joined:
    Jun 17, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks cpdan,

    I've read that documentation, but it doesn't help me.

    For example, if I create a custom file for an user in /usr/local/apache/conf/userdata , if that user adds a subdomain, the subdomain won't apply the custom config until running "ensure_vhost_includes". This is OK, but how can I set "ensure_vhost_includes" to run automattically when a subdomain is created?

    Thanks,
     
Loading...

Share This Page