Forum Moderators: phranque

Message Too Old, No Replies

Can't get SSL to work, must be something simple!

Can't get SSL to work, must be something simple!

         

Bigfunkychief

5:13 am on Oct 10, 2005 (gmt 0)

10+ Year Member



Hi,
I'm trying to enable a basic SSL webpage on my Fedora Core 4 installation...for some reason I can't even get a basic page to load. I'm trying to run one website, with a https connection for logins and http connection for the rest of the site.

Site I'm hosting is a subdomain, ie. subdomain.mydomain.com. I've created .crt and .key files, the ssl_error_log shows those are ok....

I've went through all the basic SSL How To's, and for some reason can't get it to serve an https page.

Do I have to use a Virtual Host directive? Here's what I have in my httpd.conf file :

#
# Use name-based virtual hosting.
#
NameVirtualHost 192.168.1.96:80
NameVirtualHost 192.168.1.96:443

<VirtualHost 192.168.1.96:443>
ServerName subdomain.mydomain.com
DocumentRoot /var/www/msg
ErrorLog /var/log/httpd/msg_error_log
CustomLog /var/log/httpd/msg_access_log common
DirectoryIndex index.php index.html
SSLEngine On
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
<Directory "/var/www/msg">
Options Indexes FollowSymLinks Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.1.96:80>
ServerName subdomain.mydomain.com
DocumentRoot /var/www/msg
ErrorLog /var/log/httpd/msg_error_log
CustomLog /var/log/httpd/msg_access_log common
DirectoryIndex index.html index.shtml
<Directory "/var/www/msg">
Options Indexes FollowSymLinks Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

and in my ssl.conf file :

<VirtualHost _default_:443>

# General setup for the virtual host, inherited from global configuration
DocumentRoot "/var/www/msg"
ServerName subdomain.mydomain.com:443

# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on

# Server Certificate:
SSLCertificateFile /etc/pki/tls/certs/server.crt

# Server Private Key:
SSLCertificateKeyFile /etc/pki/tls/private/server.key

Wondering how this config looks...again, not going to be running multiple sites on this server (yet), so looking for a basic setup. Thanks in advance!

BFC

Bigfunkychief

3:38 pm on Oct 11, 2005 (gmt 0)

10+ Year Member



Turns out the default configuration for the Fedora 4 firewall install (iptables) was blocking port 443. Thus no errors in the logs. Opened up port 443 and all is good.