Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[solved] Apache 2.4: Invalid command 'SSLEngine'

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
Gladdle
Guru
Guru
User avatar
Posts: 348
Joined: Sun Jul 27, 2008 12:44 am
Location: Cleebronn, Germany
Contact:
Contact Gladdle
Website

[solved] Apache 2.4: Invalid command 'SSLEngine'

  • Quote

Post by Gladdle » Mon Jun 18, 2018 2:56 pm

I have killed my Apache 2.4, if i start him, the follow appears:

Code: Select all

/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: Select all

<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: Select all

SSLEngine on
In the file /etc/apache2/httpd.conf is the Entry with SSL aviable:

Code: Select all

<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: Select all

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: Select all

[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.
Last edited by Gladdle on Sun Jul 01, 2018 3:28 pm, edited 2 times in total.
Top
freke
Veteran
Veteran
Posts: 1136
Joined: Thu Jan 23, 2003 3:17 pm
Location: Somewhere in Denmark
Contact:
Contact freke
Website

  • Quote

Post by freke » Tue Jun 19, 2018 1:53 pm

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

What if you do

Code: Select all

/etc/init.d/apache2 restart
Top
Gladdle
Guru
Guru
User avatar
Posts: 348
Joined: Sun Jul 27, 2008 12:44 am
Location: Cleebronn, Germany
Contact:
Contact Gladdle
Website

  • Quote

Post by Gladdle » Tue Jun 19, 2018 2:34 pm

That happen:

Code: Select all

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.
Top
toralf
Developer
Developer
User avatar
Posts: 3944
Joined: Sun Feb 01, 2004 2:58 pm
Location: Hamburg
Contact:
Contact toralf
Website

  • Quote

Post by toralf » Wed Jun 20, 2018 2:13 pm

Hhm, shouldn't this

Code: Select all

/etc/apache2/httpd2.conf 
be

Code: Select all

/etc/apache2/httpd.conf 
?
Top
Gladdle
Guru
Guru
User avatar
Posts: 348
Joined: Sun Jul 27, 2008 12:44 am
Location: Cleebronn, Germany
Contact:
Contact Gladdle
Website

  • Quote

Post by Gladdle » Wed Jun 20, 2018 2:38 pm

toralf wrote:Hhm, shouldn't this

Code: Select all

/etc/apache2/httpd2.conf 
be

Code: Select all

/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!
Top
freke
Veteran
Veteran
Posts: 1136
Joined: Thu Jan 23, 2003 3:17 pm
Location: Somewhere in Denmark
Contact:
Contact freke
Website

  • Quote

Post by freke » Wed Jun 20, 2018 4:06 pm

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?)
Top
papas
Tux's lil' helper
Tux's lil' helper
Posts: 141
Joined: Mon Dec 01, 2014 8:55 pm
Location: Athens

  • Quote

Post by papas » Thu Jun 21, 2018 7:22 am

is there the mod_ssl.so?
Top
Gladdle
Guru
Guru
User avatar
Posts: 348
Joined: Sun Jul 27, 2008 12:44 am
Location: Cleebronn, Germany
Contact:
Contact Gladdle
Website

  • Quote

Post by Gladdle » Sun Jul 01, 2018 3:04 pm

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: Select all

#<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
#</IfDefine>
That happens:

Code: Select all

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: Select all

[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: Select all

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

Seems like i found the problem, i have a

Code: Select all

<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...
Top
Post Reply

8 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic