Solved

SSL for linux websites

Posted on 2006-07-17
10
406 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
centos linux 65 127
Linux script delete files 3 33
Run Secure WMI query from CentOS 5 32
Upgrade BIOS / EUFI at Scale 4 35
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

772 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