Solved

SSL for linux websites

Posted on 2006-07-17
10
402 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
Comment Utility
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
Comment Utility
Ooops - last one should be:

/etc/httpd.conf

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

Author Comment

by:str_kani
Comment Utility
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
 
LVL 22

Expert Comment

by:pjedmond
Comment Utility
Restart the webserver?

/etc/init.d/httpd restart

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

Expert Comment

by:pjedmond
Comment Utility
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
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

 
LVL 12

Author Comment

by:str_kani
Comment Utility
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
Comment Utility
I am not able to telnet ip 440

but telnet ip 443 connects!!!
0
 
LVL 22

Expert Comment

by:pjedmond
Comment Utility
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
Comment Utility
> 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
Comment Utility
..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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
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…
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…

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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now