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.

Help! /scripts/rebuildnamedconf returns error

Discussion in 'General Discussion' started by Simsen, Apr 17, 2007.

  1. Simsen

    Simsen Active Member

    Joined:
    Apr 13, 2007
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    I get the this error message when running /scripts/rebuildhttpdconf:

    Code:
    [Apache::Admin::Config::Tree]: Syntax check failed for /usr/local/apache/conf/httpd.conf.test.8788 changes not saved!  The Syntax check showed: [[Syntax error on line 208 of /usr/local/apache/conf/httpd.conf.test.8788:
    module rewrite_module is built-in and can't be loaded
    ]]
    I am using Apache 1.3.37 and PHP 5.2.1

    This makes it impossible for me to rebuild Apache, so I am stuck. If anyone has a clue, please give me a hint.

    - S
     
  2. Simsen

    Simsen Active Member

    Joined:
    Apr 13, 2007
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Additional info:

    httpd configtest returns Syntax OK
    httpd restart in shell works just fine
    Apache willl NOT restart when clicking the link in WHM.

    I am hoping to get some assistance with this issue. Thanks a bunch.
     
  3. Simsen

    Simsen Active Member

    Joined:
    Apr 13, 2007
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Tried to recompile Apache - same error

    A call out again from me.

    I just tried to recompile Apache using /scripts/easyapache. I chose option 2 - "Beginner with suexec".

    Here are the last few lines of the recompile:

    Code:
    make [@php-4.4.6]...(install)...............Done
    initfpsuexec: using apache 1.x support
    [Apache::Admin::Config::Tree]: Syntax check failed for /usr/local/apache/conf/httpd.conf.test.16208 changes not saved!  The Syntax check showed: [[Syntax error on line 210 of /usr/local/apache/conf/httpd.conf.test.16208:
    module rewrite_module is built-in and can't be loaded
    ]]
    PHP version file has been updated to 4.4.6
    [Apache::Admin::Config::Tree]: Syntax check failed for /usr/local/apache/conf/httpd.conf.test.16229 changes not saved!  The Syntax check showed: [[Syntax error on line 210 of /usr/local/apache/conf/httpd.conf.test.16229:
    module rewrite_module is built-in and can't be loaded
    ]]
    ./build all
    ./build install
    initfpsuexec: using apache 1.x support
    Waiting for httpd to restart..............finished.
    
    root     16734  0.0  0.2  6936 2432 ?        Ss   19:18   0:00 /usr/local/apache/bin/httpd -DSSL
    
    httpd started ok
    ./build install
    Executing /scripts/postbuildapache (if exists)...Done
    Configuring perl magic....Off
    Configuring php-pear magic....Off
    Configuring ruby magic....Off
    Configuring php-pecl magic....Off
    [Wed Apr 18 19:19:10 2007] [warn] NameVirtualHost xxx.xxx.xxx.xxx:80 has no VirtualHosts
    /etc/rc.d/init.d/httpd start: httpd started
    initfpsuexec: using apache 1.x support
    Waiting for httpd to restart..............finished.
    
    root     16835  0.1  0.2  6920 2452 ?        Ss   19:19   0:00 /usr/local/apache/bin/httpd -DSSL
    
    httpd started ok
    
    Trying to run /scripts/rebuildhttpdconf leads to the same mod_rewrite error. I really need assistance with this.

    Thank you in advance.

    - S
     
  4. Scorpinus

    Scorpinus Member

    Joined:
    Apr 7, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I'm really sorry I have no idea....

    Maybe get that module rewrite_module out of the config and then try to rebuild?
     
  5. Simsen

    Simsen Active Member

    Joined:
    Apr 13, 2007
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    I have tried several rebuilds using /scripts/easyapache to no avail.

    I should also mention that I have recently been contacted by cPanel support, and my ticket is now in level 2 of their support hierarchy.

    - S
     
    #5 Simsen, Apr 18, 2007
    Last edited: Apr 18, 2007
  6. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    > Syntax check failed for /usr/local/apache/conf/httpd.conf.test.8788

    That means the test httpd.conf file failed to be built properly.

    If you've checked the option

    "If the configuration syntax check at the end of the process fails, leave the build as is so the configuration can be manually resolved"

    Then simply comment out the Add/LoadModule for mod_rewrite in /usr/local/apache/conf/httpd.conf and you should be able to start it then :)
     
  7. Simsen

    Simsen Active Member

    Joined:
    Apr 13, 2007
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    That is a most valid solution and your instructions will certainly make Apache run again, thank you for that.

    However, it is not an option for me not to have mod_rewrite activated.

    - S
     
  8. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    Its built it now and does not need to be LoadModule'ed, thats what the sytax error is saying :)

    (FYI, that means leave the AddModule for it in place)
     
  9. Simsen

    Simsen Active Member

    Joined:
    Apr 13, 2007
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    This is how I understand your reply:

    * In httpd.conf, I should comment out LoadModule rewrite_module libexec/mod_rewrite.so
    * But I should leave in AddModule mod_rewrite.c as it is

    If I do that I get the following error message when restarting Apache: ''
    Code:
    Waiting for httpd to restart..............finished.
    httpd has failed, please contact the sysadmin.
    Running httpd configtest outputs:
    Code:
    Syntax error on line 235 of /usr/local/apache/conf/httpd.conf:
    Cannot add module via name 'mod_rewrite.c': not in list of loaded modules
    Am I required to recompile Apache with the option you mentioned set? I might try that.

    S
     
  10. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    Sorry for the confusion :)

    Comment out:
    AddModule mod_rewrite.c
     
  11. Simsen

    Simsen Active Member

    Joined:
    Apr 13, 2007
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    No problem, thank you for taking the time to reply at all.

    I would do it right now, but it seems that I have earned the direct attention from one of the cPanel support staff, who is currently rummaging my server.

    - S
     
Loading...

Share This Page