Help! /scripts/rebuildnamedconf returns error

Simsen

Active Member
Apr 13, 2007
32
0
156
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
 

Simsen

Active Member
Apr 13, 2007
32
0
156
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.
 

Simsen

Active Member
Apr 13, 2007
32
0
156
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
 

Scorpinus

Member
Apr 7, 2004
9
0
151
I'm really sorry I have no idea....

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

Simsen

Active Member
Apr 13, 2007
32
0
156
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
 
Last edited:

cPDan

cPanel Staff
Staff member
Mar 9, 2004
721
13
243
> 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 :)
 

Simsen

Active Member
Apr 13, 2007
32
0
156
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
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
721
13
243
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
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)
 

Simsen

Active Member
Apr 13, 2007
32
0
156
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
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
721
13
243
Sorry for the confusion :)

Comment out:
AddModule mod_rewrite.c
 

Simsen

Active Member
Apr 13, 2007
32
0
156
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