Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Apache 2.4: Invalid command 'SSLEngine'
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Gladdle
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 254
Location: Cleebronn, Germany

PostPosted: Mon Jun 18, 2018 2:56 pm    Post subject: [solved] Apache 2.4: Invalid command 'SSLEngine' Reply with quote

I have killed my Apache 2.4, if i start him, the follow appears:
Code:
/usr/sbin/apache2
AH00526: Syntax error on line 14 of /etc/apache2/httpd-vhosts-https.conf:
Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration

Here is that file, i have removed the eMail Adress:
Code:
<VirtualHost 192.168.0.33:443>
   ServerName               owncloud.gladdle.rainyday-productions.de:443
   DocumentRoot             "/var/www/owncloud"
   ServerAdmin              ZENSIERT
   DirectoryIndex           index.html index.php
   ErrorLog                 /var/log/apache2/owncloud.error.log
   CustomLog                /var/log/apache2/owncloud.custom.log common
   SSLEngine                on
   SSLCertificateFile       /root/ssl/owncloud.gladdle.dynpc.org.crt
   SSLCertificateKeyFile    /root/ssl/owncloud.gladdle.dynpc.org.key
</VirtualHost>

The row with the error is that one:
Code:
SSLEngine on

In the file /etc/apache2/httpd.conf is the Entry with SSL aviable:
Code:
<IfDefine SSL>
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
</IfDefine>
LoadModule speling_module modules/mod_speling.so
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>

Also in the /etc/conf.d/apache2 is the Entry:
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP -D WSGI"

Apache was compilled with those use flags:
Code:
[ebuild   R   ~] www-servers/apache-2.4.29:2::gentoo  USE="ssl threads -debug -doc -ldap -libressl (-selinux) -static -suexec" APACHE2_MODULES="actions alias auth_basic auth_digest authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers http2 include info log_config logio mime mime_magic negotiation proxy proxy_http rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias watchdog -access_compat -asis -authn_dbd -authz_dbd -cache_disk -cache_socache -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -lbmethod_bybusyness -lbmethod_byrequests -lbmethod_bytraffic -lbmethod_heartbeat -log_forensic -macro -proxy_ajp -proxy_balancer -proxy_connect -proxy_fcgi -proxy_ftp -proxy_html -proxy_scgi -proxy_wstunnel -ratelimit -remoteip -reqtimeout -slotmem_shm -substitute -version -xml2enc" APACHE2_MPMS="worker -event -prefork"

Has anyone an idea why my apache wont start? I didn't find anything on this forum or google.
_________________
Meine Gentoo Linux Konfiguration: Notebook (ACER Aspire 9920G)


Last edited by Gladdle on Sun Jul 01, 2018 3:28 pm; edited 2 times in total
Back to top
View user's profile Send private message
freke
Guru
Guru


Joined: 23 Jan 2003
Posts: 358
Location: Somewhere in Denmark

PostPosted: Tue Jun 19, 2018 1:53 pm    Post subject: Reply with quote

Is it starting using the correct commandline/config-file(s) when invoking just /usr/sbin/apache2?

What if you do
Code:
/etc/init.d/apache2 restart
Back to top
View user's profile Send private message
Gladdle
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 254
Location: Cleebronn, Germany

PostPosted: Tue Jun 19, 2018 2:34 pm    Post subject: Reply with quote

That happen:
Code:
server / # /etc/init.d/apache2 restart
 * Starting apache2 ...
 * start-stop-daemon: failed to start `/usr/sbin/apache2'


Thats the reason i start apache directly. Apache was running a long time, but since an update or something the above error appears.
_________________
Meine Gentoo Linux Konfiguration: Notebook (ACER Aspire 9920G)
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3570
Location: Hamburg

PostPosted: Wed Jun 20, 2018 2:13 pm    Post subject: Reply with quote

Hhm, shouldn't this
Quote:
Code:
/etc/apache2/httpd2.conf
be
Code:
/etc/apache2/httpd.conf
?
Back to top
View user's profile Send private message
Gladdle
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 254
Location: Cleebronn, Germany

PostPosted: Wed Jun 20, 2018 2:38 pm    Post subject: Reply with quote

toralf wrote:
Hhm, shouldn't this
Quote:
Code:
/etc/apache2/httpd2.conf
be
Code:
/etc/apache2/httpd.conf
?

It was my fault, it's the file "/etc/apache2/httpd.conf". I have edited the above text.
And also, i have 2 config files, one for http and one for all https domains. If i disable the https config file my server starts!
_________________
Meine Gentoo Linux Konfiguration: Notebook (ACER Aspire 9920G)
Back to top
View user's profile Send private message
freke
Guru
Guru


Joined: 23 Jan 2003
Posts: 358
Location: Somewhere in Denmark

PostPosted: Wed Jun 20, 2018 4:06 pm    Post subject: Reply with quote

What happens if you comment out the <IfDefine SSL> in the httpd.conf - ie. forcing it to load the needed modules for SSL (could it be missing the -D SSL from the OPTS-entry/commandline?)
Back to top
View user's profile Send private message
papas
n00b
n00b


Joined: 01 Dec 2014
Posts: 51
Location: Athens

PostPosted: Thu Jun 21, 2018 7:22 am    Post subject: Reply with quote

is there the mod_ssl.so?
Back to top
View user's profile Send private message
Gladdle
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 254
Location: Cleebronn, Germany

PostPosted: Sun Jul 01, 2018 3:04 pm    Post subject: Reply with quote

freke wrote:
What happens if you comment out the <IfDefine SSL> in the httpd.conf - ie. forcing it to load the needed modules for SSL?

I have edited the "/etc/apache2/httpd.conf":
Code:
#<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
#</IfDefine>

That happens:
Code:
server / # /etc/init.d/apache2 restart
 * Caching service dependencies ...                                                                                                                    [ ok ]
 * Starting apache2 ...
 * start-stop-daemon: failed to start `/usr/sbin/apache2'                                                                                              [ !! ]
 * ERROR: apache2 failed to start
server / # /usr/sbin/apache2
But the server didn't start! The Logfile says:
Code:
[Sun Jul 01 17:14:51.241464 2018] [ssl:emerg] [pid 14893:tid 3070021648] AH02572: Failed to configure at least one certificate and key for owncloud.gladdle.dynpc.org:80
[Sun Jul 01 17:14:51.242307 2018] [ssl:emerg] [pid 14893:tid 3070021648] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
[Sun Jul 01 17:14:51.254666 2018] [ssl:emerg] [pid 14893:tid 3070021648] AH02312: Fatal error initialising mod_ssl, exiting.
AH00016: Configuration Failed


freke wrote:
could it be missing the -D SSL from the OPTS-entry/commandline?

If you read my 5th codeblock in my first post you see it ;)

papas wrote:
is there the mod_ssl.so?

Code:
 server / # find / -name mod_ssl.so
/usr/lib/apache2/modules/mod_ssl.so



Seems like i found the problem, i have a
Code:
<VirtualHost 192.168.0.33:443>
   ServerName         owncloud.gladdle.dynpc.org
   RedirectPermanent  / https://owncloud.gladdle.rainyday-productions.de
</VirtualHost>
And THAT doesn't work but didn't show the correct error in the LOG Files...
_________________
Meine Gentoo Linux Konfiguration: Notebook (ACER Aspire 9920G)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum