Solved

Pls help me set up SSL.. My httpd.conf file has nothing about SSL

Posted on 2006-11-21
9
175 Views
Last Modified: 2012-05-05
I am trying to set up SSL using port 443. My httpd.conf file has no examples of how to set this up. Can someone ple help me put the right stuff in my config file. Also do I have to add to my listening port 443 and duplicate the virtual host as 443. Here's what I have so far:

Listen 10.1.1.3:80
Port 80
NameVirtualHost *:80
<VirtualHost *:80>
    ServerName mydomain.com
    ServerAlias *.mydomain.com
    DocumentRoot /my/path
</VirtualHost>
<Directory "/my/path">
    AllowOverride All
</Directory>

Thanks in advance to all the commnuity for any help they can share.


0
Comment
Question by:bemara57
  • 5
  • 2
  • 2
9 Comments
 
LVL 15

Expert Comment

by:periwinkle
Comment Utility
Which version of Apache?
0
 
LVL 13

Expert Comment

by:rhickmott
Comment Utility
Can you go to

http://web-sniffer.net/

Select HTTP Version 1.1 and Request Type POST.

Leave the Agent as it is and then post up the results.

0
 
LVL 13

Expert Comment

by:rhickmott
Comment Utility
Apologies wrong Question :(
0
 
LVL 13

Expert Comment

by:rhickmott
Comment Utility
How far have you got?

You will then need to modify the separate conf for Mod SSL. How far have you got have you been given your key and certificate yet or have you generated them yourself? Basically you will need to set up your http as normal using standard HTTP.CONF setup. there is then an additional one for ModSSL which you can merge if you wish. This sets up the listen port for HTTPS.

Once you have done this your Virtual Hosts section should look like this.


<VirtualHost *:443>
         SSLEngine On
         SSLCertificateFile conf/ssl/server.cert
         SSLCertificateKeyFile conf/ssl/server.key
</VirtualHost>

NameVirtualHost *:80

<VirtualHost *:80>
     #Use The standard server definitions or define your virtual hosts as normal under this
</VirtualHost>
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 15

Expert Comment

by:periwinkle
Comment Utility
rhickmott - I'm wondering if the user has Apache 2.x where there are multiple configuration files, or if SSL support has even been compiled into the executable.
0
 
LVL 13

Expert Comment

by:rhickmott
Comment Utility
Basically yes Its impossible to process without knowing the version and how far they have got. If the OP hasent even generated a CSR request and have a signed certificate then this question can get quite extensive :)

The company I work for has a standard Apache 2 conf file which makes it easier for some ofthe admins to configure but it has everything needed for HTTPS in one file and not that extensively difficult to work with. It also depends on the OS as well.

Whats the OS?
Whats the Apache Version?
How far have you got setting it up?

Is basically the information we need.
0
 

Author Comment

by:bemara57
Comment Utility
I am using AIX Unix 4.3.3 and Apache 1.3.26

I have already gotten the SSL certificate and key files generated for me. They actually came from another server. We are moving our website from one server to another (Apache to Apache). So I have already got the 2 files from the other server. Now I have to configure my new webserver Apache 1.3.26.
0
 
LVL 13

Accepted Solution

by:
rhickmott earned 500 total points
Comment Utility
Ok what do you currently have in your httpd.conf file?

Im assuming you have compiled Apache with mod_ssl. In which case you will need to uncomment the

LoadModule ssl_module modules/mod_ssl.so

Line in your Apache Setup.

At the end of the file before your Virtual Hosts try adding the following.

<IfModule mod_ssl.c>
         
      ## Handle SSL
      Listen 443

      #SSL Types
      AddType application/x-x509-ca-cert .crt
      AddType application/x-pkcs7-crl    .crl

      SSLPassPhraseDialog  builtin
          SSLSessionCache none
      SSLSessionCacheTimeout  300      
      SSLMutex default
      SSLRandomSeed startup builtin
      SSLRandomSeed connect builtin
      SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
      
      <VirtualHost *:443>

            #  General setup for the virtual host
            DocumentRoot <HTTPSDOCROOT>
            ServerName *:443
            ServerAdmin you@yourdomain.com
            ErrorLog logs/error.log
            TransferLog logs/access.log
                  
            <Directory "HTTPSDOCROOT">
                      Options FollowSymLinks
                      AllowOverride All
                      Order allow,deny
                      Allow from all
            </Directory>

            <Files ~ "\.(cgi|shtml|phtml|php3?)$">
                      SSLOptions +StdEnvVars
            </Files>
            <Directory "cgi-bin">
                      SSLOptions +StdEnvVars
            </Directory>
      
            CustomLog logs/ssl_request_log \
                "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

            SSLEngine On
            SSLCertificateFile conf/ssl/server.cert
            SSLCertificateKeyFile conf/ssl/server.key
      </virtualhost>
</IfModule>

And then above your Virtual Host declarations add.

<VirtualHost *:443>
        SSLEngine On
        SSLCertificateFile conf/ssl/server.cert
        SSLCertificateKeyFile conf/ssl/server.key
</VirtualHost>

Making sure of course that that your server.cert and server.key files are in the right place ( <apache>/conf/ssl/ )

Let us know if you get any probs
0
 

Author Comment

by:bemara57
Comment Utility
Thanks but there is no LoadModule ssl_module modules/mod_ssl.so line in my config file. Is it possible that I have to download and install this module onto Apache or does it always come with it?
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now