PDA

View Full Version : Invalid command 'SSLEngine', perhaps mis-spelled or defined by a module not included


gorski
03-31-2004, 10:26 AM
Hi i have a problem with apache

I try : /etc/rc.d/init.d/httpd graceful

error :

/usr/sbin/apachectl graceful: configuration broken, ignoring restart
/usr/sbin/apachectl graceful: (run 'apachectl configtest' for details)

I try : apachectl configtest

and recieved :

Invalid command 'SSLEngine', perhaps mis-spelled or defined by a module not included in the server configuration

What do You supose to do to fix a httpd.conf

Please Help

Best Regards
Lukas

jlasman
03-31-2004, 11:41 AM
SSLEngine is a proper configuration option, so that's not the problem.

Did this error occur from your first use of the server or did it just start occurring?

If it just started occurring, what did you do to update the server or any of it's services before it started?

What do you see when you enter this command from a shell prompt:

httpd -version

What OS are you using?

Jeff

DirectAdmin Support
03-31-2004, 12:04 PM
Have a look for /usr/lib/apachce/libssl.so

If it doesn't exist, try running:

cd /usr/local/directadmin/customapache
./build clean
./build apache_mod_ssl

John

gorski
03-31-2004, 12:30 PM
Jeff:
It's not new server but my first with Direct Admin
I have there about 15 users at this time.
One of my users say that he trying to do something with SSL, but he don't now what :) (he don't have a shell acces)

I saw that problem when i want to change something,i create backup httpd.conf file before it has error too :/

Server version: Apache/1.3.29 (Unix)
Server built: Mar 31 2004 21:10:55

OS : Redhat 9.0

John:

I tryed Your sugestion but :

Done installing Apache+Mod_SSL+Frontpage.
Restoring certificate and key, and turning on httpd for DirectAdmins's check.
[root@phantom customapache]# /etc/rc.d/init.d/httpd graceful
/usr/sbin/apachectl graceful: configuration broken, ignoring restart
/usr/sbin/apachectl graceful: (run 'apachectl configtest' for details)

DirectAdmin Support
03-31-2004, 01:08 PM
I'm not sure that "graceful" is setup.. try a "restart"

John

l0rdphi1
03-31-2004, 01:31 PM
[root@server1 install]# apachectl configtest
Syntax error on line 25 of /etc/httpd/conf/ips.conf:
Invalid command 'SSLEngine', perhaps mis-spelled or defined by a module not included in the server configuration[root@server1 install]# service httpd stop
Stopping httpd: [ OK ][root@server1 install]# service httpd start
/etc/init.d/httpd: line 46: ulimit: open files: cannot modify limit: Invalid argument
/etc/init.d/httpd: line 47: ulimit: open files: cannot modify limit: Invalid argument
/etc/init.d/httpd: line 48: ulimit: open files: cannot modify limit: Invalid argument
/etc/init.d/httpd: line 49: ulimit: open files: cannot modify limit: Invalid argument
Starting httpd: [Wed Mar 31 15:29:49 2004] [warn] module perl_module is already loaded, skipping
[Wed Mar 31 15:29:52 2004] [warn] NameVirtualHost [...] has no VirtualHosts
[FAILED]service httpd start/restart has been like this for me for the logest time now - probably since before 1.2 - but it did work at one point in time.

However, DirectAdmin (or something) automatically starts httpd for me within a few seconds of when I stop it. I can also start/restart httpd through DirectAdmin itself.

DirectAdmin Support
03-31-2004, 01:44 PM
/etc/init.d/httpd: line 46: ulimit: open files: cannot modify limit: Invalid argument
Take out the -S in the ulimit line in the httpd boot script.

John

jlasman
03-31-2004, 01:46 PM
Hmmm...

I haven't tried service httpd restart (or the actual script itself, at "/etc/rc.d/init.d/httpd restart") in a long time, and now I'm a bit afraid to :( .

John, did you by any chance make any changes to apache configuration that would cause anything break?

I'll bring my testbed system up to date within the next day, and do some testing on it.

However I'm on RHL 7.3. Gorski says he's on RHL 9. Phil, what version are you running?

(I'd wonder a bit; I'd bet that RHL 9 can get out of sync, since it's designed to work with Apache 2, but with DA it runs 1.3.28.)

Jeff

l0rdphi1
03-31-2004, 01:52 PM
Originally posted by DirectAdmin Support
Take out the -S in the ulimit line in the httpd boot script.

John
hurrah! :)

[root@server1 root]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Wed Mar 31 15:52:58 2004] [warn] module perl_module is already loaded, skipping
[Wed Mar 31 15:52:59 2004] [warn] NameVirtualHost [...] has no VirtualHosts
[ OK ]

I'm on RH9.

jlasman
03-31-2004, 02:01 PM
Originally posted by DirectAdmin Support
Take out the -S in the ulimit line in the httpd boot script.
I'm on RHL 7.3, and I've got four such lines. But apache starts properly.

Is your information just for RHL 9, and not for RHL 7.3, or should I take out all those -S instances?

Thanks.

Jeff

gorski
03-31-2004, 03:33 PM
Im back

Thank YOU

Now it work :) Restart succesfull
But why graceful not work, i don't now :)

Thenk You All

DirectAdmin Support
04-01-2004, 09:57 AM
Jeff: the -S doesn't work on some systems (VPS's I think), but does on most. I've removed it for new installs so it works on everything.

gorski: graceful doesn't work because it uses apachectl which does not pass the require -DHAVE_SSL type paramaters on the command line.

John

existenz
04-01-2004, 11:03 AM
Just to keep track I also had the same problem in the past on some of our boxes here.

http://directadmin.com/forum/showthread.php?s=&threadid=2168

jlasman
04-01-2004, 11:07 AM
Did it turn out to be the same thing? the -S option?

Thanks.

Jeff

existenz
04-01-2004, 10:56 PM
Sorry FreeBSD we don't have that option since we use a different boot script.

Again today for no aparent reason a server that HAD be running properly for days just stopped working:

Syntax error on line 19 of /etc/httpd/conf/ips.conf:
Invalid command 'SSLEngine', perhaps mis-spelled or defined by a module not included in the server configuration

Its weard...

DirectAdmin Support
04-02-2004, 11:20 AM
So it was being restarted properly, then not? :s
Whats the state of the /usr/lib/apache/libssl.so file?.. (does it exist, and check the date on it vs the rest of the so files)

Is it fixed now? if so, what steps were taken. (recompile, reboot).. will it happen again..

I'd like to get to the bottom of this..
Is it random in nature?.. does it work sometimes, but not others?
I'm wondering if it would be wise to compile apache as a static binary without having all of the external modules being loaded in.

John

rhoekman
04-05-2004, 05:48 PM
I'm having the same error on freebsd 5.x

The only thing I have done was the php 4.3.5 upgrade.

Note I did not answer yes to questions to recompile some of the link libs like mcrypt, gd etc. because they already existed. Anyone else done this?

Files in /usr/lib/apache/ :

drwxr-xr-x 2 root wheel 1.0K Mar 7 07:27 .
drwxr-xr-x 5 root wheel 8.0K Mar 17 22:29 ..
lrwxr-xr-x 1 root wheel 20B Mar 7 07:27 apache -> ../../usr/lib/apache
-rw-r--r-- 1 root wheel 8.2K Mar 7 07:27 httpd.exp
-rwxr-xr-x 1 root wheel 1.2M Mar 7 07:31 libperl.so
-rwxr-xr-x 1 root wheel 7.0M Mar 30 00:55 libphp4.so
-rwxr-xr-x 1 root wheel 97K Mar 7 07:27 libproxy.so
-rwxr-xr-x 1 root wheel 207K Mar 7 07:27 libssl.so
-rwxr-xr-x 1 root wheel 9.7K Mar 7 07:27 mod_access.so
-rwxr-xr-x 1 root wheel 7.8K Mar 7 07:27 mod_actions.so
-rwxr-xr-x 1 root wheel 11K Mar 7 07:27 mod_alias.so
-rwxr-xr-x 1 root wheel 6.1K Mar 7 07:27 mod_asis.so
-rwxr-xr-x 1 root wheel 11K Mar 7 07:27 mod_auth.so
-rwxr-xr-x 1 root wheel 7.6K Mar 7 07:27 mod_auth_anon.so
-rwxr-xr-x 1 root wheel 29K Mar 7 07:27 mod_autoindex.so
-rwxr-xr-x 1 root wheel 9.1K Mar 7 07:27 mod_cern_meta.so
-rwxr-xr-x 1 root wheel 15K Mar 7 07:27 mod_cgi.so
-rwxr-xr-x 1 root wheel 9.1K Mar 7 07:27 mod_define.so
-rwxr-xr-x 1 root wheel 10K Mar 7 07:27 mod_digest.so
-rwxr-xr-x 1 root wheel 7.4K Mar 7 07:27 mod_dir.so
-rwxr-xr-x 1 root wheel 7.5K Mar 7 07:27 mod_env.so
-rwxr-xr-x 1 root wheel 13K Mar 7 07:27 mod_example.so
-rwxr-xr-x 1 root wheel 9.3K Mar 7 07:27 mod_expires.so
-rwxr-xr-x 1 root wheel 17K Mar 7 07:27 mod_frontpage.so
-rwxr-xr-x 1 root wheel 7.4K Mar 7 07:27 mod_headers.so
-rwxr-xr-x 1 root wheel 17K Mar 7 07:27 mod_imap.so
-rwxr-xr-x 1 root wheel 37K Mar 7 07:27 mod_include.so
-rwxr-xr-x 1 root wheel 19K Mar 7 07:27 mod_info.so
-rwxr-xr-x 1 root wheel 6.7K Mar 7 07:27 mod_log_agent.so
-rwxr-xr-x 1 root wheel 18K Mar 7 07:27 mod_log_config.so
-rwxr-xr-x 1 root wheel 7.6K Mar 7 07:27 mod_log_referer.so
-rwxr-xr-x 1 root wheel 15K Mar 7 07:27 mod_mime.so
-rwxr-xr-x 1 root wheel 24K Mar 7 07:27 mod_mime_magic.so
-rwxr-xr-x 1 root wheel 10.0K Mar 7 07:27 mod_mmap_static.so
-rwxr-xr-x 1 root wheel 29K Mar 7 07:27 mod_negotiation.so
-rwxr-xr-x 1 root wheel 59K Mar 7 07:27 mod_rewrite.so
-rwxr-xr-x 1 root wheel 9.7K Mar 7 07:27 mod_setenvif.so
-rwxr-xr-x 1 root wheel 11K Mar 7 07:27 mod_speling.so
-rwxr-xr-x 1 root wheel 19K Mar 7 07:27 mod_status.so
-rwxr-xr-x 1 root wheel 7.8K Mar 7 07:27 mod_unique_id.so
-rwxr-xr-x 1 root wheel 8.1K Mar 7 07:27 mod_userdir.so
-rwxr-xr-x 1 root wheel 12K Mar 7 07:27 mod_usertrack.so
-rwxr-xr-x 1 root wheel 9.7K Mar 7 07:27 mod_vhost_alias.so

-- update:

Disabling SSLEngine with a comment # gives even more errors:

/usr/local/directadmin/data/users/rick # apachectl configtest
Warning: DocumentRoot [/usr/local/frontpage/version5.0/admin-exes] does not exist
Syntax error on line 28 of /usr/local/directadmin/data/users/rick/httpd.conf:
Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration

Line 28 in httpd.conf:

php_flag engine on

--

This make me believe something is not compiled right when I upgraded php.. I'm trying this again and recompile every library that is linked against it.. I'll let you know when I'm done..

rhoekman
04-05-2004, 06:19 PM
Okay a recompile of php with all the libraries did not make the error go away..

DirectAdmin Support
04-06-2004, 12:35 AM
Hello,

apachectl won't work. It doesn't pass -DHAVE_SSL and other such commands via the command line. You must use the boot script only for start,stop,restart and reload. (or else removed all the "<IfDefine HAVE_SSL>" type of statements in the httpd.conf.

Use:

/usr/local/etc/rc.d/httpd start

to test for errors.

John

existenz
04-06-2004, 12:43 PM
Just so you know on our 5.x boxes I did tell it to recompile everything. The big problem for me was the SSLEngine tag needed to be removed from the other ips on the server. I could not get apache to start with it in them. I still get a mod_perl.c is already loaded crap but that is unreleated.

DirectAdmin Support
04-08-2004, 10:08 AM
If you want me to have a look, send your ip/root pass. The "SSLEngine" errors shouldn't need to be removed...

Might test out removing all of the <IfDefine HAVE_SSL> lines from the httpd.conf, as ssl should always be there. That was the module will be loaded, and (hopefully) the errors will subside.

John

XYZed
06-13-2004, 03:29 AM
Syntax error on line 17 of /etc/httpd/conf/ips.conf:
Invalid command 'SSLEngine', perhaps mis-spelled or defined by a module not included in the server configuration


This is showing on all of our DA servers. New and Old and various Apache version (1.3.29 - 1.3.31) all servers are RH9.

If I comment out the <VirtualHost IP:443>>/VirtualHost> and then test again I get an even bigger list of problems:

Warning: DocumentRoot [/usr/local/frontpage/version5.0/admin-exes] does not exist
Syntax error on line 28 of /usr/local/directadmin/data/users/admin/httpd.conf:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration


So I'd rather just the one error :-)

But did anyone find a fix for this ?

Thanks.

DirectAdmin Sales
06-14-2004, 04:45 PM
Hello,

To restart apache, always use:

RedHat:
/sbin/service httpd restart

FreeBSD:
/usr/local/etc/rc.d/httpd restart


Anything that uses apachectl will fail because it doesn't pass the required -DHAVE_VALUE parameters.

John

davef8
01-12-2005, 02:20 PM
I ran into the same problem on a RHEL V3 box. We did a custom apache build from scratch on a brand new DA install in order to get PHP5 running.

Once we did we got the same SSLEngine error messages. Very frustrating...

We recompiled apache_mod_ssl. This didn't seem to make a difference. Then we removed all instances of "<IfDefine HAVE_SSL>" from the httpd.conf file and everything is now working.

brew
07-15-2005, 08:35 PM
Mine also got same errors:

-bash-2.05b# /usr/local/etc/rc.d/httpd restart
Stopping httpd: [ FAILED ]
Starting httpd: [ OK ]
-bash-2.05b# [Sat Jul 16 10:25:04 2005] [warn] Loaded DSO modules/libphp3.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)
[Sat Jul 16 10:25:04 2005] [warn] module perl_module is already loaded, skipping
Syntax error on line 30 of /usr/local/directadmin/data/users/admin/httpd.conf:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration

-bash-2.05b# ps -auwx|grep http
-bash-2.05b#


please advise..thanks

SteveK42
07-29-2005, 09:58 PM
HELP! I am getting the SAME problem. All of a sudden, apache crashed and I can't start it up. When I try, I get the SSLEngine errors. I commented out every piece that had that line in it, and now it doesn't recognize php. HELP!!!

SteveK42
07-29-2005, 10:30 PM
Great...I removed all of the IFDefined's and now /etc/init.d/httpd actually does something...it says okay. However, nothing gets started at all; at this point, I can't even SEE an error, it simply just doesn't work!

SteveK42
07-29-2005, 10:50 PM
Note to all with this problem...I got it fixed.

I deleted all the libs, did a clean and rebuild, nothing was working. I finally got to the point with no errors, but apache still wouldn't start. I saw my /var/log/httpd/error_log had entries...they were:

[Sat Jul 30 01:36:02 2005] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
semget: No space left on device
semget: No space left on device
[Sat Jul 30 01:36:51 2005] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
semget: No space left on device
[Sat Jul 30 01:37:02 2005] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
semget: No space left on device
semget: No space left on device
[Sat Jul 30 01:38:02 2005] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
semget: No space left on device
semget: No space left on device


A restart fixed it all. I was even able to put all the IsDefined's back.

James2005
11-03-2005, 05:11 AM
Would appreciate any advice and help...

My Problem :

When i try to restart httpd in in ssh as blow ...
It gave error message as below....

Stopping httpd: [FAILED]
Starting httpd: Syntax error on line 45 of /usr/local/directadmin/data/users/cuserver1/httpd.conf:
Invalid command 'SSLEngine', perhaps mis-spelled or defined by a module not included in the server configuration

So I remove the line 45,46,47 by putting a "#" in front of the line...and the httpd can be restarted..

Note :
line 45, 46, 47 are as below
# SSLEngine ON
# SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
# SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key

Then the httpd can be restatrd, but give another warning message :
Starting httpd: [Thu Nov 3 06:00:39 2005] [warn] VirtualHost ip address1:80 overlaps with VirtualHost 6ip address1:80, the first has precedence, perhaps you need a NameVirtualHost directive


Advice/helps needed :

1) By removing the line, 45,46,47, what will be unwanted result?
Is it that my SSL would no more in function? What should be a more proper way to solve this? What could be the cause for this?

2)The warning message for the ip address overlap, how to solve it.

Thank you very much !

jlasman
11-04-2005, 06:50 PM
The warning message is probably not critical.

If you comment out or remove the SSL lines your server won't be able to serve https.

Jeff

James2005
11-05-2005, 01:57 AM
If you comment out or remove the SSL lines your server won't be able to serve https.

Jeff
Thank you for the info.

In this case, how should i solve this. If i comment back the line, it will stop the httpd again. Thanks

toml
11-05-2005, 09:21 AM
Originally posted by James2005
Thank you for the info.

In this case, how should i solve this. If i comment back the line, it will stop the httpd again. Thanks

What OS are you running, and how are you starting apache? I know with the RedHat based systems, you need to start it with the init.d file (i.e. service httpd start), or else all the variables don't get set properly, and you will get syntax errors.

James2005
11-07-2005, 05:45 AM
Originally posted by toml
What OS are you running, and how are you starting apache? I know with the RedHat based systems, you need to start it with the init.d file (i.e. service httpd start), or else all the variables don't get set properly, and you will get syntax errors.

Thanks for helping..

OS is CentOS, Control Panel is Direct Admin, I try to restart httpd from Direct Admin and also from SSH root # service httpd restart....the error message i get is from service httpd restart

toml
11-11-2005, 07:20 AM
The only other thing I can think of that might cause this problem, is if the httpd file in /etc/init.d was not the one that DA installed. If that is the case, you should be able reinstall it, by doing a cp /usr/local/directadmin/customapache/httpd /etc/init.d/httpd

James2005
11-13-2005, 10:08 PM
Originally posted by toml
The only other thing I can think of that might cause this problem, is if the httpd file in /etc/init.d was not the one that DA installed. If that is the case, you should be able reinstall it, by doing a cp /usr/local/directadmin/customapache/httpd /etc/init.d/httpd

Thank you toml , my problem was solved by reinstalling as you suggested (with help from Direct Admin and also my hosting company Hivelocity).

Below is some detail for job was done , hope it can be of some reference help to thoose has similar problem.

cd /usr/local/directadmin/customapache
./build php n

The configure spat out:

configure: error: libcrypto not found!

[root@server customapache]# rpm -qa |grep ssl
xmlsec1-openssl-1.2.6-3
openssl-0.9.7a-43.4
openssl-devel is not installed. I've installed it.

Recompiled everything (apache/php etc) to make sure ssl works with it.

Had to also install e2fsprogs-devel rpm.