Solved

SSL for linux websites

Posted on 2006-07-17
10
416 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
[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
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

707 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