Solved

SSL for linux websites

Posted on 2006-07-17
10
409 Views
Last Modified: 2010-04-20
I develop websites at my home, i need to test my websites on https also...
I have a linux box, i guess it may have openssl installed or something for this...

i don't know how to configure this to use apache and ssl,

I need help to test my websites on LAN, https://

I use rednat 8

0
Comment
Question by:str_kani
  • 6
  • 3
10 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 400 total points
ID: 17126946
In most cases, all you have to do is uncomment the following 2 lines in your httpd.conf:
------8X-----------
LoadModule ssl_module modules/mod_ssl.so
Listen 0.0.0.0:443
------8X-----------

This will probably be one of the following (or similar):

/etc/httpd/conf.d/ssl.conf

/etc/httpd/httpd.conf

/etc/httpd/conf

(   (()
(`-' _\
 ''  ''

0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17126949
Ooops - last one should be:

/etc/httpd.conf

(   (()
(`-' _\
 ''  ''
0
 
LVL 12

Author Comment

by:str_kani
ID: 17133680
okay that helps, but i have this commented out in my ssl.conf, but still I am not able access my lan website using

https://lan.mysite

what i am missing?


Here is the ssl.conf if you need...

#
# This is the Apache server configuration file providing SSL support.
# It contains the configuration directives to instruct the server how to
# serve pages over an https connection. For detailing information about these
# directives see <URL:http://httpd.apache.org/docs-2.0/mod/mod_ssl.html>
#
#   For the moment, see <URL:http://www.modssl.org/docs/> for this info.
#   The documents are still being prepared from material donated by the
#   modssl project.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#

LoadModule ssl_module modules/mod_ssl.so

#   Until documentation is completed, please check http://www.modssl.org/
#   for additional config examples and module docmentation.  Directives
#   and features of mod_ssl are largely unchanged from the mod_ssl project
#   for Apache 1.3.

#
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
#
Listen *:443

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common

##
##  SSL Global Context
##
##  All SSL configuration in this context applies both to
##  the main server and all SSL-enabled virtual hosts.
##

#
#   Some MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog  builtin

#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First the mechanism
#   to use and second the expiring timeout (in seconds).
#SSLSessionCache        none
#SSLSessionCache        shmht:/var/cache/mod_ssl/scache(512000)
#SSLSessionCache        shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCache         dbm:/var/cache/mod_ssl/scache
SSLSessionCacheTimeout  300

#   Semaphore:
#   Configure the path to the mutual exclusion semaphore the
#   SSL engine uses internally for inter-process synchronization.
SSLMutex  file:logs/ssl_mutex

#   Pseudo Random Number Generator (PRNG):
#   Configure one or more sources to seed the PRNG of the
#   SSL library. The seed data should be of good random quality.
#   WARNING! On some platforms /dev/random blocks if not enough entropy
#   is available. This means you then cannot use the /dev/random device
#   because it would lead to very long connection times (as long as
#   it requires to make more entropy available). But usually those
#   platforms additionally provide a /dev/urandom device which doesn't
#   block. So, if available, use this one instead. Read the mod_ssl User
#   Manual for more details.
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
#SSLRandomSeed startup file:/dev/random  512
#SSLRandomSeed startup file:/dev/urandom 512
#SSLRandomSeed connect file:/dev/random  512
#SSLRandomSeed connect file:/dev/urandom 512

##
## SSL Virtual Host Context
##

0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 22

Expert Comment

by:pjedmond
ID: 17133894
Restart the webserver?

/etc/init.d/httpd restart

(   (()
(`-' _\
 ''  ''
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17133906
Try accessing it with:

https://ipaddress/

instead.

If you

telnet ipaddress 443

should 'connect'. You won't see anything, but you will get a connection. Compare it with:

telnet ipaddress 440

(   (()
(`-' _\
 ''  ''

0
 
LVL 12

Author Comment

by:str_kani
ID: 17134139
440 or 443?


I didn't change anything to my ss.conf, it's already like this...
0
 
LVL 12

Author Comment

by:str_kani
ID: 17134142
I am not able to telnet ip 440

but telnet ip 443 connects!!!
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17134241
That's correct - 440 was a dummy number, 443 indicates that your ssl is working correctly.

You should now be able to connect:

https://ipnumber/

If you can connect to the ip, but not the name, then that is a different issue to do with your DNS/hosts resolution.

:)

(   (()
(`-' _\
 ''  ''
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 100 total points
ID: 17136197
> If you can connect to the ip, but not the name, then that is a different issue to do with your DNS/hosts resolution.
just half the truth, but let's wait if https://ipnumber/ works ...
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17136498
..ok - fair comment....but as telnet connects and "Listen *:443", i'd expect to at least get an error page provided the user hasn't been having too much fun 'tweaking things'

(   (()
(`-' _\
 ''  ''
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

809 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