1

I built an Apache 2.2.32 server on Ubuntu from sources, and if I test my phpinfo() I see:

'./configure' '--prefix=/usr/local/php_7.2.25' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysqli=/usr/local/mysql-5.1.55/bin/mysql_config' '--with-gettext' '--with-curl' '--enable-intl' '--enable-ssl'

So I understand that SSL is enabled.

I created the certificate files 'server.key', 'server.crt' and 'cert.csr', within '/usr/local/apache2/conf/', by using '/usr/bin/openssl'. So I understand that OpenSSL works ok.

I inserted the following lines in the '/usr/local/apache2/conf/extra/httpd-vhosts.conf' file, at the bottom.

Listen 443

<VirtualHost *:443>
DocumentRoot "/myserver/web"
ServerName foo.local
ErrorLog "logs/own-error_log"
CustomLog "logs/own-access_log" common
 
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/usr/local/apache2/conf/server.crt"
SSLCertificateKeyFile "/usr/local/apache2/conf/server.key"
 
<Directory "/myserver/web">
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    DirectoryIndex index.php index.html index.htm
</Directory>
</VirtualHost>

However, when I tried to restart Apache, I got the following error message:

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

What am I doing wrong?

4
  • Why build from sources opposed to using the apache2 binary that can be installed with apt? – Stephen Ostermiller Nov 3 '20 at 20:45
  • Are you using the Debian/Ubuntu style Apache configuration with /etc/apache2/mods-available symlinked from /etc/apache2/mods-enabled? – Stephen Ostermiller Nov 3 '20 at 20:46
  • Why using an old version of Apache? And not even the latest of the ended branch: "The Apache HTTP Server Project had long committed to provide maintenance releases of the 2.2.x flavor through June of 2017. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases." You are just opening yourself to more problems. – Patrick Mevzek Nov 3 '20 at 23:39
  • 1
    Do you have LoadModule directive, cf httpd.apache.org/docs/2.4/mod/mod_so.html#loadmodule ? This is how extensions are loaded, otherwise compiling them is just not enough. Which is basically exactly what the error message tells you... – Patrick Mevzek Nov 3 '20 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.