can't enable ssl in apache2 "Apache2 + openssl"


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu can't enable ssl in apache2 "Apache2 + openssl"
# 1  
Old 12-27-2010
can't enable ssl in apache2 "Apache2 + openssl"

I have running apache2 and I want to enable ssl in my server for that I compile openssl without errorsImage But when i start Apache it gives following error,,,,,,,Image

Code:

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

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:
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
Moderator's Comments:
Mod Comment Please use code tags for commands and listings, and obfuscate your email

Last edited by pludi; 12-27-2010 at 10:48 AM..
# 2  
Old 12-27-2010
Is the location of the ssl dynamic libs in the $LD_LIBRARY_PATH for apache?
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. AIX

How to enable "TCP MD5 Signatures" and "https" on AIX?

I have searched many times but nothing found. Somebody help please :(:(:( (1 Reply)
Discussion started by: bobochacha29
1 Replies

3. AIX

Bison -pap_expr_yy invalid character:% unexpected "identifier" while running make for Apache2.4.3 64

The Follwing packages are installed on my AIX 6.1 box gcc-4.7.2-1 gcc-c++-4.7.2-1 gcc-cpp-4.7.2-1 gcc-gfortran-4.7.2-1 libgcc-4.7.2-1 libgomp-4.7.2-1 libstdc++-4.7.2-1 libstdc++-devel-4.7.2-1 gmp-5.0.5-1 libmpc-1.0.1-2 libmpc-devel-1.0.1-2 libmpcdec-1.2.6-1 libmpcdec-devel-1.2.6-1... (0 Replies)
Discussion started by: Ashish Gupta
0 Replies

4. Shell Programming and Scripting

How to enable "banner" for a user in solaris?

Password: Using keyboard-interactive authentication. Do you agree with the banner terms (y/n)?: y (4 Replies)
Discussion started by: frintocf
4 Replies

5. OS X (Apple)

Trying to enable "web sharing" from terminal

I am using phproxy on my mac. I would like to be able to enable / disable web sharing from the command line, so I can turn it on only when I need it(remotely). I remember reading that the "screen sharing" can be set on/off in /Library/Preferences I don't see any obvious preferences for "web... (3 Replies)
Discussion started by: chancho
3 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. OS X (Apple)

Weird "security" bahavior with SSL certificates

Hello, I have been attempting to automate the addition of SSL certificates to keychains on a MAC using the "security" command. I've noticed two things, 1 of which I don't understand. 1. If I use something like "security add-trusted-cert -d -k /System/Library/Keychains/SystemRootCertificates... (1 Reply)
Discussion started by: prafulnama
1 Replies

8. Shell Programming and Scripting

Shell Script to provide "answers" to SSL Cert Request

Hello, I need assistance with creating a shell script to generate SSL Certificate Requests on remote hosts. Below is my stab at this, but I cannot figure out how to pass the requested arguments into the openssl command correctly. I have a major problem with redirecting the "answers" into the... (2 Replies)
Discussion started by: azvelocat
2 Replies
Login or Register to Ask a Question