Installation steps
 
 
 
 
 
 1, into the Apache source directory.
 
 
 
 
 
 2, into the module folder under the SSL directory.
 
 
 
 
 
 3, find the Oepnssl include path, Ubuntu system is in the / usr / include / openssl directory.
 
 
 
 
 
 4. Operation Apxs
 
 
 
 root @ v238: ~ / httpd-2.2.26 / modules / ssl # / usr / local / apache2 / bin / apxs-i-c-a-D have_openssl = 1-i / usr / include / openssl- LCRYPTO-LSSL-LDL * .c
 / usr / local / apr-httpd // build-1 / libtool--silent--mode = compile gcc-prefer-pic-dlinux-d_reentrant-d_gnu_source-g-O2 -pthread-i / usr / local / apache2 / include -i / usr / local / apr-httpd // include / apr-1-i / usr / local / apr-util-httpd / include / Apr-1-i / usr / include / openssl-dhave_openssl = 1-co mod_ssl .lo mod_ssl.c && Touch Mod_ssl.slo
 / usr / local / apr-httpd // build-1 / libtool--silent--mode = compile gcc-prefer-pic-dlinux-d_reentrant-d_gnu_source-g-O2 -pthread-i / usr / local / apache2 / include -i / usr / local / apr-httpd // include / apr-1-i / usr / local / apr-util-httpd / include / Apr-1-i / usr / include / openssl-dhave_openssl = 1-co ssl_engine_config .lo ssl_engine_config.c && Touch Ssl_ Engine_config.slo
 ...
 /usr/local/apache2/build/instdso.sh sh_libtool = '/ usr / local / apr-httpd // build-1 / libtool' mod_ssl.la/usr/local/ Apache2 / modules
 / usr / local / apr-httpd // build-1 / libtool--mode = install CP mod_ssl.la/usr/local/apache2/modules/
 LIBTOOL: INSTALL: CP. Libs / mod_ssl.so / usr / local / apache2 / modules / mod_ssl.so
 LIBTOOL: INSTALL: CP. Libs / mod_ssl.lai / usr / local / apache2 / modules / mod_ssl.la
 LIBTOOL: INSTALL: CP. LIBS / MOD_SSL.A / USR / LOCAL / APACHE2 / MODULES / MOD_SSL.A
 Libtool: install: chmod 644 / USR / LOCAL / APACHE2 / MODULES / MOD_SSL.A
 Libtool: install: ranlib / usr / local / apache2 / modules / mod_ssl.a
 Libtool: finish: path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/jdk1.7.0_45/bin : / sbin "Ldconfig-n / usr / local / apache2 / modules
 -------------------------------------------------- --------------------
 Libraries have been installed in:
 / usr / local / apache2 / modules
 If you are ever happen to want to link against installed libraries
 In a given directory, Libdir, your must either use Libtool, and
 Specify the full pathname of the library, or use the '-llibdir'
 Flag during linking and do at least one of the following:
 -Add Libdir to the 'Ld_library_path' environment variable
 During execution
 -Add Libdir to the 'Ld_run_path' environment variable
 During linking
 -Use the '-WL, -RPATH-WL, LIBDIR' linker flag
 -Have your system administrator add Libdir to '/etc/ld.so.conf'
 Operating system documentation about shared libraries for
 More information, such as the LD (1) and ld.so (8) manual pages.
 -------------------------------------------------- --------------------
 chmod 755 / usr / local / apache2 / modules / mod_ssl.so
 [Activating module 'SSL' in / usr / local / apache2 / conf / httpd.conf]
 5, check the configuration, restart
 
 
 
 After successful execution, you can see in the httpd.conf configuration file that the Mod_ssl module has been added and the mod_ssl.so file is also created in module in the Apache installation directory.
 
 
 
 
 
 root @ v238: ~ / httpd-2.2.26 / modules / ssl # / usr / local / apache2 / bin / httpd-t
 Httpd: could not reliably determine the server's fully qualified domain name, using 192.168.0.238 for ServerName
 Syntax OK
 Prompt syntax OK, restart Apache.
 
 
 
 
 
 Error handling
 
 
 
 
 
 Error one,
 
 
 
 
 
 Error code "Unrecognized SSL toolkit !, declaration for parameter 'XXXXXX' but no such parameter.
 
 
 
 
 
 This error occurs because HAVE_OPENSSL this is not define and can be resolved by adding the-D have_openssl = 1.
 
 
 
 root @ v238: ~ / httpd-2.2.26 / modules / ssl # / usr / local / apache2 / bin / apxs-i-c-a mod_ssl.c
 / usr / local / apr-httpd // build-1 / libtool--silent--mode = compile gcc-prefer-pic-dlinux-d_reentrant-d_gnu_source-g-O2 -pthread-i / usr / local / apache2 / include -i / usr / local / apr-httpd // include / apr-1-i / usr / local / apr-util-httpd / include / Apr-1-co mod_ssl.lo mod_ssl.c && Touch Mod_ssl.slo
 In the file included from ssl_private.h: 60: 0,
 From mod_ssl.c: 27:
 Ssl_toolkit_compat.h: 267: 2: Error: #error "Unrecognized SSL toolkit!"
 In the file included from ssl_private.h: 72: 0,
 From mod_ssl.c: 27:
 Ssl_util_ssl.h: 78: 31: error: unknown type name 'SSL'
 Ssl_util_ssl.h: 79: 31: error: unknown type name 'SSL'
 Ssl_util_ssl.h: 80: 1: Error: unknown type name 'X509'
 ...
 Ssl_private.h: 637: 14: error: declaration for parameter 'Ssl_hook_upgrade' but no such parameter
 Ssl_private.h: 636: 14: error: declaration for parameter 'ssl_hook_readreq' but no such parameter
 Ssl_private.h: 635: 14: error: declaration for parameter 'ssl_hook_fixup' but no such parameter
 Ssl_private.h: 634: 14: error: declaration for parameter 'ssl_hook_access' but no such parameter
 Ssl_private.h: 633: 14: error: declaration for parameter 'Ssl_hook_usercheck' but no such parameter
 Ssl_private.h: 632: 14: error: declaration for parameter 'Ssl_hook_auth' but no such parameter
 Ssl_private.h: 629: 14: error: declaration for parameter 'Ssl_init_modulekill' but no such parameter
 Ssl_private.h: 628: 14: error: declaration for parameter 'ssl_init_child' but no such parameter
 Mod_ssl.c: 573: 1: error: expected '{' at end of input
 Apxs: Error: Command failed with rc= 65536
 #solve
 root @ v238: ~ / httpd-2.2.26 / modules / ssl # / usr / local / apache2 / bin / apxs-i-c-a-D have_openssl = 1-i / usr / include / openssl Mod_ssl.c
 Error two,
 
 
 
 Error code, undefined Symbol: ssl_cmd_sslmutex.
 
 
 
 
 
 APXS compilation of the Append module succeeded, but the Apache failed to start. After this error occurred, I changed the MOD_SSL.C to * .C when I ran APXS. Unlike adding mod_deflate, SSL contains multiple source code files.
 
 
 
 
 
 root @ v238: ~ / httpd-2.2.26 / modules / ssl # / usr / local / apache2 / bin / httpd-t
 Httpd: syntax error on line Of / usr / local / apache2 / conf / httpd.conf: cannot load / usr / local / apache2 / modules / mod_ssl.so Into server: /usr/local/apache2/modules/mod_ssl.so: undefined Symbol: ssl_cmd_sslmutex
 root @ v238: ~ / httpd-2.2.26 / modules / ssl #
 #solve
 root @ v238: ~ / httpd-2.2.26 / modules / ssl # / usr / local / apache2 / bin / apxs-i-c-a-D have_openssl = 1-i / usr / include / openssl *. C
 Error three,
 
 
 
 
 
 Error code, undefined Symbol: x509_info_free, which is usually caused by statically connected OpenSSL libraries (default), and the solution is to add-LCRYPTO-LSSL-LDL parameters.
 
 
 
 
 
 root @ v238: ~ / httpd-2.2.26 / modules / ssl # / usr / local / apache2 / bin / httpd-t
 Httpd: syntax error on line Of / usr / local / apache2 / conf / httpd.conf: cannot load / usr / local / apache2 / modules / mod_ssl.so Into server: /usr/local/apache2/modules/mod_ssl.so: undefined Symbol: x509_info_free
 #solve
 root @ v238: ~ / httpd-2.2.26 / modules / ssl # / usr / local / apache2 / bin / apxs-i-c-a-D have_openssl = 1-i / usr / include / openssl- LCRYPTO-LSSL-LDL * .c
 
 
 
 
 
 This is done by appending the Mod_ssl module to the installed Apache, but it is recommended that you add the SSL module the first time you compile Apache.