httpd.conf and virtual hosts, mod_ssl - Need Help plz

httpd.conf and virtual hosts, mod_ssl - Need Help plz

Post by Huw Dix » Wed, 09 Jul 2003 14:33:28



Hi - here's my situ: 1 server w/apache/mod_ssl with 3 virtual hosts
running behind firewall - 1 ip address. Trying to get one (1) of the
virtual hosts to be accessible thru ports 80 and 443. After 20 hours
of RTFM, my attempts to connect to https for that particular host just
hang. Everything else is fine.

Iv got the approp httpd.conf snippets below. Can someone tell me what
Im missing or have labeled wrong please? Many thanks for any pointers.

**********HTTPD.CONF *************
.
.
LoadModule setenvif_module /usr/lib/apache/1.3/mod_setenvif.so
.
.
.
.
LoadModule ssl_module /usr/lib/apache/1.3/mod_ssl.so
.
.
.
#
# Port: The port to which the standalone server listens. For
# ports < 1023, you will need apache to be run as root initially.
#

<IfModule mod_ssl.c>
   Listen 80
   Listen 443
</IfModule>
.
.
.
.
##
##  SSL Global Context
##
##  All SSL configuration in this context applies both to
##  the main server and all SSL-enabled virtual hosts.
##

#<IfModule mod_ssl.c>
#Listen 80
#Listen 443
#</IfModule>

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

<IfModule mod_ssl.c>

#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program ( uiltin' 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 either  one'
#   or  bm:/path/to/file' for the mechanism to use and
#   second the expiring timeout (in seconds).
#SSLSessionCache        none
#SSLSessionCache        shm:logs/ssl_scache(512000)
SSLSessionCache         dbm:/var/run/ssl_scache
SSLSessionCacheTimeout  300

#   Semaphore:
#   Configure the path to the mutual explusion semaphore the
#   SSL engine uses internally for inter-process synchronization.
SSLMutex  file:/var/run/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

#   Logging:
#   The home of the dedicated SSL protocol logfile. Errors are
#   additionally duplicated in the general error log file.  Put
#   this somewhere where it cannot be used for symlink attacks on
#   a real server (i.e. somewhere where only root can write).
#   Log levels are (ascending order: higher ones include lower ones):
#   none, error, warn, info, trace, debug.
#SSLLog      /var/log/apache/ssl_engine_log
#SSLLogLevel info

</IfModule>

### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on
your
# machine you can setup VirtualHost containers for them.
# Please see the documentation at
<URL:http://www.apache.org/docs/vhosts/>
# for further details before you try to setup virtual hosts.
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# If you want to use name-based virtual hosts you need to define at
# least one IP address (and port number) for them.
#
NameVirtualHost 10.10.10.180:80
NameVirtualHost 10.10.10.180:443
<VirtualHost 10.10.10.180:80>

    DocumentRoot "/var/www/domain1.com"
    ServerName www.domain1.com
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    ErrorLog /var/log/apache/domain1-error_log
    CustomLog /var/log/apache/domain1-access_log combined
    ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin"
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>
 <IfModule mod_php4.c>
            DirectoryIndex index.php index.php3 index.html
   </IfModule>
</VirtualHost>
#
<VirtualHost 10.10.10.180:443>
<IfModule mod_ssl.c>
   SSLEngine on
   SSLCertificateFile    /etc/apache/server.crt
   SSLCertificateKeyFile /etc/apache/server.key
   SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</IfModule>

    DocumentRoot "/var/www/domain1.com"
    ServerName www.domain1.com
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    ErrorLog /var/log/apache/domain1-error_log
    CustomLog /var/log/apache/domain1-access_log combined
    ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin"
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>
 <IfModule mod_php4.c>
            DirectoryIndex index.php index.php3 index.html
   </IfModule>
</VirtualHost>

<VirtualHost 10.10.10.180:80>

    DocumentRoot "/var/www/domain2.com"
    ServerName www.domain2.com
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    ErrorLog /var/log/apache/domain2-error_log
    CustomLog /var/log/apache/domain2-access_log combined
    ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin"
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>
 <IfModule mod_php4.c>
            DirectoryIndex index.php index.php3 index.html
   </IfModule>
</VirtualHost>
<VirtualHost 10.10.10.180:80>

    DocumentRoot "/var/www/domain3.org/webroot"
    ServerName www.domain3.org
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    ErrorLog /var/log/apache/domain3_error_log
    CustomLog /var/log/apache/domain3-access_log combined
    ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin"
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>
 <IfModule mod_php4.c>
            DirectoryIndex index.php index.php3 index.html
   </IfModule>
</VirtualHost>

 
 
 

httpd.conf and virtual hosts, mod_ssl - Need Help plz

Post by Huw Dix » Wed, 09 Jul 2003 22:10:42


disregard. a good nights sleep found problem between keyboard and chair....