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.
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' Options FollowSymLinks AllowOverride All Order allow,deny Allow from all DirectoryIndex index.php index.html index.htm
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?
- Why build from sources opposed to using the apache2 binary that can be installed with
- Are you using the Debian/Ubuntu style Apache configuration with
- 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.
- 1 Do you have
LoadModuledirective, 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...