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.

Apache config

Discussion in 'EasyApache' started by easysupport, Jul 9, 2012.

  1. easysupport

    easysupport Registered

    Joined:
    Jul 9, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    I hope I am posting this in the correct location
    I have just inherited the responsibility for a hosting solution and have never used cPanel before

    Having looked at the config file that cPanel creates when a client is added, I find that all clients have the same configuration entries in httpd.conf file
    Since all the entries are basically the same except for user and group values is there a way to consolidate the configuration in httpd.conf and read in the exceptions from external files

    for example
    To pass requests to correct site
    RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1

    then read in the user and group
    <Virtu... somedomain:80>
    user client1
    group client1
    </Virt....>

    combining log files into one
    # splittable logs
    LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
    CustomLog logs/access_log vcommon
    and then run a parse script when client request access to logs

    This would cut down the load time of apache

    Now the question .... is this possible?
     
  2. fi77i

    fi77i Well-Known Member

    Joined:
    Aug 20, 2008
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Uruguay
    cPanel Access Level:
    Root Administrator
    You can always edit you httpd.conf and add any includes you need to it.
    Always remember to run apache distiller after editing so the changes get saved for future rebuilds.

    Also, I suggest you to check this for more information.

    Custom Directives outside of a VirtualHost Tag

    Regards.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I believe that the headache of changing all of these values in the manner mentioned is actually going to cause a greater overhead for Apache versus the current system. When you try it, let us know how it goes. I think using mod_rewrite for all of these requests rather than actually letting them come into Apache to read it will be harder to processes and more likely to cause errors to occur. Under the current setup, you don't have to worry about a domain being properly parsed. Using mod_rewrite for every single call to the machine for every domain for every single page isn't the most beneficial way to use mod_rewrite, but it's your call.
     
Loading...

Share This Page