LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-27-2008, 09:39 PM   #1
Harvfive
LQ Newbie
 
Registered: Oct 2008
Posts: 6

Rep: Reputation: 0
Apache 2.2.9 and SSL Config


Hey all,

I have a web server configured to run on localhost:80 as Im using a WUI to manage some services on a SLES 10 install. I was looking into enabling SSL for this (just for my own educational purposes). I've created and signed my own certs, and I've directed the path to my certs, and enabled SSL through httpd.conf by including the httpd-ssl.conf file. I've read many manuals but they seem to be missing very important information about whether or not you need to configure it as a virtualhost through httpd-ssl, or just to modify the original configuration file. In any case, when restarting apache I get this error, to which Ive found no answer. And I did enable ssl support when configuring my apache install. I believe it may have something to do with mod_ssl.c not being called before these are run. As well, to kill two birds with one stone, do I need to specify the directive for the ssl connection or will it just use the one in httpd.conf?

In either case, here is what I have added to the original httpd-ssl.conf file.

[Sun Oct 12 13:00:16 2008] [warn] module php5_module is already loaded, skippingSyntax error on line 56 of /usr/local/apache/conf/extra/httpd-ssl.conf:
Invalid command 'SSLPassPhraseDialog', perhaps misspelled or defined by a module not included in the server configuration



# General setup for the virtual host
Listen 80
Listen 443
<VirtualHost localhost:443>
SSLEngine on
ServerName http://localhost
SSLCertificateFile "/usr/local/apache/server.crt"
SSLCertificateKeyFile "/usr/local/apache/server.key"
</VirtualHost>

If anyone can offer suggestions I would be greatly appreciative. Keep in mind I'm a n00b, and this is my first run-in with configuring SSL. :S

Here is my whole HTTPD.conf file:

ServerRoot "/usr/local/apache"


Listen 80


# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule php5_module modules/libphp5.so


<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>

User daemon
Group daemon

</IfModule>
</IfModule>

ServerAdmin kmakiewi@gmail.com

ServerName 192.168.164.129:80

DocumentRoot "/usr/local/apache/htdocs"

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

<Directory "/usr/local/apache/htdocs">

Options Indexes FollowSymLinks


AllowOverride None

Order allow,deny
Allow from all

</Directory>


<IfModule dir_module>
DirectoryIndex index.html index.php

AddType text/html php
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>


ErrorLog "logs/error_log"


LogLevel warn

<IfModule log_config_module>

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog "logs/access_log" common


</IfModule>

<IfModule alias_module>

ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"

</IfModule>

<IfModule cgid_module>
#
# ScriptSock: On threaded servers, designate the path to the UNIX
# socket used to communicate with the CGI daemon of mod_cgid.
#
#Scriptsock logs/cgisock
</IfModule>


<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>


DefaultType text/plain

<IfModule mime_module>

# Use for PHP 5.x:
LoadModule php5_module modules/libphp5.so

TypesConfig conf/mime.types



AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

</IfModule>

#This is for Authentication (user)

<Directory "/usr/local/apache/htdocs/">
AuthType Basic
AuthName "Abandon Hope, all Ye who enter"
AuthUserFile /usr/local/apache/passwd/passwords
Require user trooper
</Directory>

# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
 
Old 10-29-2008, 06:59 AM   #2
ptemmerman
Member
 
Registered: Oct 2008
Location: Spain
Distribution: Ubuntu
Posts: 75

Rep: Reputation: 15
Hi.

I'm not an Apache expert, but these are my thoughts:

Based on the config files that you provided, I don't see that you actually load the ssl module. I expected to see something like:

Load ssl_module /usr/local/apache2/modules/mod_ssl.so

As far as I know, it is not necessary to have a virtual host, in order to accept SSL connections.

Also, the php_module error is because you load it twice:
LoadModule php5_module modules/libphp5.so
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSL Servers vs Apache SSL mlewis Linux - Networking 2 04-02-2008 10:13 AM
Having problem with SSL config in Apache2 noone Linux - Software 6 10-17-2006 08:27 PM
secure. vs www. ssl apache config hank43 Linux - Networking 4 08-09-2006 10:06 PM
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
Apache2 SSL Config problem Xixulon Linux - Software 1 10-19-2004 04:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration