I have running apache2 and I want to enable ssl in my server for that I compile openssl without errors But when i start Apache it gives following error,,,,,,,
Code:
root@charith-desktop:/usr/local/apache2/bin# ./apachectl start
Syntax error on line 441 of /usr/local/apache2/conf/httpd.conf:
Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration
When I uncomment "LoadModule ssl_module modules/mod_ssl.so" line in httpd.conf I get following error....
Code:
root@charith-desktop:/usr/local/apache2/bin# ./apachectl start
httpd: Syntax error on line 18 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: invalid ELF header
This is my httpd.conf
Code:
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
NameVirtualHost 127.0.0.1:80
NameVirtualHost 127.0.0.1:443
<VirtualHost 127.0.0.1:80>
ServerAdmin chidden@email.noexist
DocumentRoot "/usr/local/apache2/htdocs"
ServerName ...........
ServerAlias............
ErrorLog /usr/local/apache2/logs/server2log
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerAdmin chidden@email.noexist
DocumentRoot "/usr/local/apache2/htdocs/Server2"
ServerName .......
ServerAlias ............
ErrorLog /usr/local/apache2/logs/server2log
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerAdmin chidden@email.noexist
DocumentRoot "/usr/local/apache2/htdocs/Server1"
ServerName .......
ServerAlias .............
ErrorLog /usr/local/apache2/logs/server1log
</VirtualHost>
<VirtualHost 127.0.0.1:443>
ServerAdmin chidden@email.noexist
DocumentRoot /usr/local/apache2/htdocs/ssl
ServerName .........
ServerAlias ............
ErrorLog /usr/local/apache2/logs/server2log
SSLEngine On
# Here, I am allowing only "high" and "medium" security key lengths.
SSLCipherSuite HIGH:MEDIUM
# Here I am allowing SSLv3 and TLSv1, I am NOT allowing the old SSLv2.
SSLProtocol all -SSLv2
# Server Certificate:
SSLCertificateFile /usr/local/apache2/secure.com.crt
# Server Private Key:
SSLCertificateKeyFile /usr/local/apache2/conf/secure.com.key
# Server Certificate Chain:
SSLCertificateChainFile /usr/local/apache2/conf/my-ca.crt
# Certificate Authority (CA):
SSLCACertificateFile /usr/local/apache2/conf/my-ca.crt
# This is needed so that you can use auto-indexing for some directories in the
# /var/www/SSL directory branch. This can be handy if you would like to have
# a list of sensitive files for people to download.
<Directory "/var/www/SSL">
Options Indexes
AllowOverride None
Allow from from all
Order allow,deny
</Directory>
</VirtualHost>
following information may help you
sudo a2enmod ssl
Code:
root@charith-desktop:/usr/local/apache2/bin# sudo a2enmod ssl
Module ssl already enabled
root@charith-desktop:/usr/local/apache2/bin#
Thank you very much for your valuable time this is big help for me because I wast lot of time for this but couldn't get answer please help me