Solved

Cant able to configure SSL on apache 2.0.59

Posted on 2013-06-20
6
359 Views
Last Modified: 2014-01-26
cannot able to confgiure SSL on Apache using Linux machine.The system specs i have is
- centos 4.8 final
- apache 2.0.59

I configure the Apache with command

./configure --enable-so --with-apxs2 --enable-ssl

Also i am getting the error in error log i.e.
[warn] Init: Session Cache is not configured [hint: SSLSessionCache]

Tried couple of tweaks but none work.

Help in this regard is really appreciated.
0
Comment
Question by:nocinfospan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39264729
Can you post your httpd.conf?
0
 
LVL 6

Expert Comment

by:Vijay Pratap Singh
ID: 39264958
Please configure cache memory for Webserver apache and restart the httpd deamon.
0
 
LVL 3

Accepted Solution

by:
rajeev2353 earned 500 total points
ID: 39265245
hi,
please see this method and implement .

#yum install mod ssl

# cd /etc/pki/tls/certs
# openssl genrsa -des3 -out apachekey.pem 2048

Generating RSA private key, 2048 bit long modulus
..................+++
...................................+++
e is 65537 (0x10001)
Enter pass phrase for apachekey.pem:
Verifying - Enter pass phrase for apachekey.pem:

--
--
-

# openssl req -new -key apachekey.pem -out apachekey.csr

Enter pass phrase for apachekey.pem:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:IN
State or Province Name (full name) [Berkshire]:
Locality Name (eg, city) [Newbury]:
Organization Name (eg, company) [My Company Ltd]:
Organizational Unit Name (eg, section) []:IT
Common Name (eg, your name or your server's hostname) []:
Email Address []:vivek@nixcraft.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

# openssl ca -in apachekey.csr -out apachecert.pem

# cp apachecert.pem /etc/pki/tls/http/
# cp apachekey.pem /etc/pki/tls/http/

# vi /etc/httpd/conf.d/ssl.conf
Listen 10.10.29.68:443
SSLRandomSeed startup file:/dev/urandom 1024
SSLRandomSeed connect file:/dev/urandom 1024

<VirtualHost ip:443>
    SSLEngine On
    SSLCertificateFile /etc/pki/tls/http/apachecert.pem
    SSLCertificateKeyFile /etc/pki/tls/http/apachekey.pem
    SSLProtocol All -SSLv2
    SSLCipherSuite HIGH:MEDIUM:!aNULL:+MD5
    DocumentRoot "/var/www/html/ssl"
    ServerName hostname:443
</VirtualHost>

# mkdir -p /var/www/html/ssl

# vi /etc/httpd/conf/httpd.conf

<Directory /var/www/html/ssl>
         SSLRequireSSL
         SSLOptions +StrictRequire
         SSLRequire %{HTTP_HOST} eq "domain name"
         ErrorDocument 403 https://domain name/sslerror.html
</Directory>

# service httpd restart
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
LVL 1

Author Comment

by:nocinfospan
ID: 39266325
@rajeev2353
As i am using Centos 4.8 they do not support base repository for yum any more. so i cant install through yum . the only option i have is to configure the apache with
.\configure --enable-ssl .

@rickyzen

where exactly should i change??

@Mazdajai
please see attached.
httpd.txt
0
 
LVL 3

Expert Comment

by:rajeev2353
ID: 39267529
hi,

By Default Yum install on Centos-4.8 with online,but you have not internet then you can create repo

#vi /etc/yum.repo.d/server.repo
[server]
name=server
baseurl=file:\\\media\cdrecoder\CentOS\RPMS\
gpgcheck=0
enable=1

and save this file

# yum install openssl-*
#yum install mod_ssl-*

######################

Otherwise, you can install manually,

#cd /media/cdrecorder\Centos\RPMS
#rpm -ivh openssl-*
#rpm -ivh mod_ssl-*
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39301980
You need to add them to your http.conf -
LoadModule ssl_module modules/mod_ssl.so
SSLSessionCache        shmcb:/path/path(512000)

Open in new window


Take a look on the following in SSLSessionCache -
http://httpd.apache.org/docs/2.0/mod/mod_ssl.html#sslsessioncache

Example http.conf with SSL -
http://code.google.com/p/casshib/wiki/Sample_httpd_ssl_conf
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question