Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 31 to 44 of 44
  1. #31
    Member This forum account has been confirmed by cPanel staff to represent a vendor. aarondwyer's Avatar
    Join Date
    Mar 2005
    Location
    Brisbane
    Posts
    72

    Default

    I'm trying to work this out as well but my additional include files aren't working.

    When I do as the previous posts mention
    1) create sub directories and my include file with valid httpd instructions, then
    2) run this script /scripts/ensure_vhost_includes --user=username

    My httpd.conf get this added to the correct users virtualhost section

    Include "/usr/local/apache/conf/userdata/*.conf"
    Include "/usr/local/apache/conf/userdata/*.owner-root"
    Include "/usr/local/apache/conf/userdata/std/*.conf"
    Include "/usr/local/apache/conf/userdata/std/*.owner-root"

    Now these directories are not pointing to the directory structure that I created. So I'm assuming that it can't find my include file.

    But you can't edit the httpd.conf directly to point to the include file.

    I'm lost, anyone got some ideas for me.

    Thanks
    Aaron
    http://backup-smart.com Automatically And Safely Backup All Your cPanel Websites To Your Local Computer
    Free 7 Day Trial of this new software. MAC, PC, Linux

  2. #32
    cPanel Staff
    Join Date
    Mar 2004
    Posts
    704

    Default

    Quote Originally Posted by aarondwyer View Post
    I'm trying to work this out as well but my additional include files aren't working.

    When I do as the previous posts mention
    1) create sub directories and my include file with valid httpd instructions, then
    2) run this script /scripts/ensure_vhost_includes --user=username

    My httpd.conf get this added to the correct users virtualhost section

    Include "/usr/local/apache/conf/userdata/*.conf"
    Include "/usr/local/apache/conf/userdata/*.owner-root"
    Include "/usr/local/apache/conf/userdata/std/*.conf"
    Include "/usr/local/apache/conf/userdata/std/*.owner-root"

    Now these directories are not pointing to the directory structure that I created. So I'm assuming that it can't find my include file.

    But you can't edit the httpd.conf directly to point to the include file.

    I'm lost, anyone got some ideas for me.

    Thanks
    Aaron
    Your include files *have* to be in those directories and *have* to end in .conf (or .owner-root in this case as well), what is the full path to the include files you made?
    Last edited by cpdan; 02-28-2008 at 07:09 AM. Reason: .owner-root clarification

  3. #33
    Member This forum account has been confirmed by cPanel staff to represent a vendor. aarondwyer's Avatar
    Join Date
    Mar 2005
    Location
    Brisbane
    Posts
    72

    Default

    Here's what I've done...

    Filename : custom.conf
    Dir : /usr/local/apache/conf/userdata/std/2/username/domainname
    Contents : (single line) Alias /webmail /home/username/public_html/webmail

    username is the accounts username
    and
    domainname is the associated domainname

    Then I ran /scripts/ensure_vhost_includes --user=username

    I only want this change to be for this username so I didn't want to put .conf files in here...

    Include "/usr/local/apache/conf/userdata/std/*.conf"


    I have restarted apache just in case I needed to, but the change has not resulted in my Alias I added working.

    Shouldn't there be an Include line in the httpd.conf file that points to the username subdirectory or does cPanel just look there regardless.

    Thanks
    Aaron

  4. #34
    cPanel Staff
    Join Date
    Mar 2004
    Posts
    704

    Default

    Quote Originally Posted by aarondwyer View Post
    Here's what I've done...

    Filename : custom.conf
    Dir : /usr/local/apache/conf/userdata/std/2/username/domainname
    Are you running Apache 1.3 or 2.x? /usr/local/apache/conf/userdata/std/2/ is only for apache 2.x, for apache 1.3 you'd need /usr/local/apache/conf/userdata/std/1/....

    Quote Originally Posted by aarondwyer View Post
    I only want this change to be for this username so I didn't want to put .conf files in here...

    Include "/usr/local/apache/conf/userdata/std/*.conf"
    Its gets added because the directory exists. Soon it'll only get added if there are indeed *.conf in there but thats a different matter...

  5. #35
    Member This forum account has been confirmed by cPanel staff to represent a vendor. aarondwyer's Avatar
    Join Date
    Mar 2005
    Location
    Brisbane
    Posts
    72

    Default

    Doh!. Awesome it's now working, I was running Apache 1.3

    This is now in my httpd.conf after running the update script.

    Include "/usr/local/apache/conf/userdata/*.conf"
    Include "/usr/local/apache/conf/userdata/*.owner-root"
    Include "/usr/local/apache/conf/userdata/std/*.conf"
    Include "/usr/local/apache/conf/userdata/std/*.owner-root"
    Include "/usr/local/apache/conf/userdata/std/1/*.conf"
    Include "/usr/local/apache/conf/userdata/std/1/*.owner-root"
    Include "/usr/local/apache/conf/userdata/std/1/username/*.conf"
    Include "/usr/local/apache/conf/userdata/std/1/username/domainname/*.conf"


    Thanks a bunch

    PS. I really appreciate this forum and it's giving members.

    Aaron

  6. #36
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    654

    Default Help

    This has been working fine, I'd added about 40 wildcard aliases using the methods described in this thread and they were all working correctly.

    However....

    Just out of curiosity I ran the following script...

    /scripts/verify_vhost_includes

    It came up with a load of errors and renamed ALL the conf files to filename.conf.broken

    If I run the script again it lists all the conf.broken files and says they are "still broken".

    I guess thats just totally screwed up the config! I'm not happy at all.

    I havent restarted the web server so until that happens things should remain as they were but how do I undo the changes that script just made and make sure these are working correctly again ?

  7. #37
    cPanel Staff
    Join Date
    Mar 2007
    Posts
    113

    Default

    verify_vhost_includes doesn't perform a very accurate check on those files. It treats them as if they were the main httpd.conf, and this sort of check fails with many directives.

    To just move all of the *.broken files back you'll need to do something like this:

    for BROKE in `find /usr/local/apache/conf/userdata/ -name *.broken` ; do ORIG=`echo -n $BROKE | sed 's/.broken$//'` ; mv $BROKE $ORIG; done

  8. #38
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    654

    Default

    Worked perfectly - thank you for your help. I'll know now not to run that verify script again

  9. #39
    Registered User
    Join Date
    Aug 2005
    Posts
    2

    Default

    I'll add to the argument that this is an awful lot of gymnastics to go through for something that was once just a simple httpd.conf change.

    Feels a little like a reverse Easter egg hunt where you have to go stash things in a bunch of spots for EasyApache to find them rather than just cracking open a single httpd.conf file to make your changes.

    And really poorly documented to boot.
    Last edited by rtafoya; 05-31-2008 at 04:09 PM.

  10. #40
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    654

    Default

    Quote Originally Posted by rtafoya View Post
    I'll add to the argument that this is an awful lot of gymnastics to go through for something that was once just a simple httpd.conf change.

    Feels a little like a reverse Easter egg hunt where you have to go stash things in a bunch of spots for EasyApache to find them rather than just cracking open a single httpd.conf file to make your changes.

    And really poorly documented to boot.
    Yep, I agree.

    They should include an interface in WHM so we can add these more easily.

  11. #41
    cPanel Staff
    Join Date
    Mar 2004
    Posts
    704

    Default

    On easyapache's main page:

    Profile

    Welcome to Easy::Apache v3.2.0 Build XYZ

    This tool will guide you through the available options for updating your
    Apache web server, PHP, and optional modules. [Read the documentation for
    further information]

    [EasyApache Quick Reference guide]

    Click on
    EasyApache Quick Reference guide -> How do I make sure my manual httpd.conf edits are preserved?

    Its pretty straightforward and points you to where you can manage things in WHM.

    It also has a dialog ("Why do I even need to ask this question?") that explains why this reverse easter egg hunt is necessary.

    HTH

  12. #42
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    654

    Default

    Quote Originally Posted by cpdan View Post
    On easyapache's main page:

    It also has a dialog ("Why do I even need to ask this question?") that explains why this reverse easter egg hunt is necessary.

    HTH
    Its still a MAJOR pain in the ass whichever way you look at it.

    It wouldnt be neccessary if you provided a simple interface from within WHM where we could add these - i.e choose the domain name, specify the virtualhost entry we want including and click submit - background script can create the file structure and run the neccessary "distiller" or whatever you call it - job done.

  13. #43
    Member
    Join Date
    Apr 2007
    Posts
    5

    Default

    I'm revisiting this so much later, but: what 4u123 said!

  14. #44
    cPanel Staff
    Join Date
    Mar 2004
    Posts
    704

    Default

    Quote Originally Posted by 4u123 View Post
    Yep, I agree.

    They should include an interface in WHM so we can add these more easily.
    Its on the list

    For now use the simple instructions at "EasyApache Quick Reference guide -> How do I make sure my manual httpd.conf edits are preserved" to preserve them or just use Includes which do have a WHM interface.

Similar Threads & Tags
Similar threads

  1. Faulty httpd.conf - can't rebuild with rebuildhttpd.conf
    By movielad in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 03-21-2011, 12:43 PM
  2. Preserve amends to /etc/httpd/conf/httpd.conf ?
    By robocrop in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-14-2010, 02:08 AM
  3. httpd.conf sites/www.domain.com.conf Wildcard DNS
    By ttremain in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 12-16-2008, 11:19 AM
  4. Daily httpd restart changes AllowOverride None to All in httpd.conf
    By Lasers in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 02-26-2007, 12:17 PM
  5. httpd.conf
    By jackal in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-15-2003, 01:48 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube