LinuxQuestions.org
Review your favorite Linux distribution.
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 02-01-2008, 08:01 PM   #1
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Rep: Reputation: 30
Help setting up SSL


Hey all,
Trying to set up a virtual SSL host:
What am I doing wrong?

httpd.conf:
Code:
Listen 80

NameVirtualHost 172.16.113.10:80
NameVirtualHost 172.16.113.11:443

<VirtualHost 172.16.113.11:443>
    DocumentRoot PATH
    ServerName www.name.com
    SSLCertificateFile /etc/ssl/crt/name.crt
    SSLCertificateKeyFile /etc/ssl/crt/name.key
    SSLCertificateFile /etc/ssl/crt/name.ca-bundle
</VirtualHost>
ssl.conf:
Code:
Listen 443
SSLEngine on
and those certificates exists.
BUt The page is not loading.
I get an error code: 12233

Thanks so much!
 
Old 02-02-2008, 12:13 AM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I haven't seen an error like that - is it displayed in the browser? Can you check Apache's logs and see if there's more info there?
 
Old 02-02-2008, 11:57 AM   #3
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
Hey,
Error Log:
Code:
[Fri Feb 01 21:41:09 2008] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
And its a browser error message:
 
Old 02-02-2008, 12:14 PM   #4
baldur_the_god
Member
 
Registered: Feb 2007
Posts: 54

Rep: Reputation: 15
ssl

the problem is right there in your error log. it says your server name your certificate does not match the server name on your computer...thus the error. When you configure it, the server names have to match otherwise it looks like there are shinanigans going on between the two compturs. When you configure your certificate, you must use the same name as your server...

Last edited by Matir; 02-08-2008 at 12:33 PM. Reason: Removed commercial link.
 
Old 02-02-2008, 12:22 PM   #5
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
Thanks, But the server name defined in where?
This is a web server hosting multiple sites. This particular ssl host is just another site on the box.

When i created my certificate, I did use the server name that I have defined within the virtual host.
Did I miss something?
 
Old 02-02-2008, 12:26 PM   #6
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
Ok, the Certificate did not have WWW and my servername in httpd.conf was definied as WWW.host.com

I changed Servername to without "www" and restarted apache, but still same error. Hmmm
 
Old 02-02-2008, 12:28 PM   #7
baldur_the_god
Member
 
Registered: Feb 2007
Posts: 54

Rep: Reputation: 15
ssl

in /etc/hosts you have a defined server name in there...also i think there is one is /etc/sysconfig/networking or something like that...when you are doing your ssl cert, all the names have to be the same...when you connect to the server, it sends a name...when your cert file is sent, it has a name...if these do not match the error occurs.

baldur

Last edited by Matir; 02-08-2008 at 12:32 PM. Reason: Removed commercial link.
 
Old 02-02-2008, 12:31 PM   #8
baldur_the_god
Member
 
Registered: Feb 2007
Posts: 54

Rep: Reputation: 15
ssl

since it says localhost...it is probably your /etc/hosts file that is configured wrong...

youripaddress yourhostname

check out configure /etc/hosts

baldur

Last edited by Matir; 02-08-2008 at 12:32 PM. Reason: Removed commercial link
 
Old 02-02-2008, 12:42 PM   #9
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
Ah ha, yes of course. However I added the IP address of my secure site (which is an IP alias) with the domain I used to register my certificate with.
Still getting the same error "12233", however now there is nothing in my SSL_error_log. Logging level is set to Debug.

Is there anything I need to do to reload /etc/hosts??
I thought it was named, but its not a running service.
 
Old 02-02-2008, 12:44 PM   #10
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
Without rebooting the network daemon??
Its a live production server.
Thanks
 
Old 02-02-2008, 03:32 PM   #11
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
Hope someone can help me please.
Still not getting to secure site:
Heres current status:

httpd.conf:
Code:
<VirtualHost 172.16.113.11:443>
    DocumentRoot PATH/estore
    ServerName name.com
    ServerAdmin email

    ErrorLog /etc/httpd/logs/ssl_error_log
    TransferLog /etc/httpd/logs/ssl_access_log
    LogLevel debug

    SSLEngine on
    SSLCertificateFile /etc/ssl/crt/domain.crt
    SSLCertificateKeyFile /etc/ssl/crt/domain.key
    SSLCertificateChainFile /etc/ssl/crt/domain.ca-bundle
</VirtualHost>
I do "apachectl graceful" and restart my browser.
When I browse to the WAN IP (https://IP), I get a certificate, and I can view the certificate. But when I hit "ok" the page does not load, it just hangs. Here is the last few lines of the log file:
Code:
:
:
[Sat Feb 02 16:07:07 2008] [debug] ssl_engine_io.c(1662): | 01b0: e2 c9 87 cb 1c d3 59 32-f4 59 d8 f4 fe 89 4f 86  ......Y2.Y....O. | [Sat Feb 02 16:07:07 2008] [debug] ssl_engine_io.c(1668): +-------------------------------------------------------------------------+
[Sat Feb 02 16:07:07 2008] [info] Initial (No.1) HTTPS request received for child 0 (server SERVER.com:443) [Sat Feb 02 16:07:07 2008] [debug] ssl_engine_kernel.c(1745): OpenSSL: Write: SSL negotiation finished successfully [Sat Feb 02 16:07:07 2008] [info] Connection to child 0 closed with standard shutdown(server SERVER.com:443, client 75.74.16.196)
When I connect to https://domain.com. I do not get prompted for a certificate, and nothing happens.

Thanks for the help
 
Old 02-02-2008, 04:27 PM   #12
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Do you have a Directory entry for your DocumentRoot? For example:
Code:
  <Directory "PATH/estore">
    SSLRequireSSL
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
I'd also recommend using apachectl -k stop && apachectl -k start and checking the logs again in case anything strange happened with apachectl graceful (open connections aren't aborted and log files aren't closed immediately).
 
Old 02-03-2008, 10:42 AM   #13
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
I wasnt aware I needed a directory entry for the Secure site??
 
Old 02-03-2008, 01:36 PM   #14
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
It depends. If you have an "upstream" directive that forbids access to that directory, then you need to explicitly allow it. If, for example, your default root level access is deny (as the Apache docs recommend) like the following, then you will need it:
Code:
<Directory />
  Order Deny,Allow
  Deny from All
</Directory>
 
Old 02-03-2008, 04:07 PM   #15
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
Hey, Thanks for the reply.
Before I installed my SSL certs, and change the virtual host to 443, the directory was readable, and accesable via http. So i would have to believe there is no directive restricting it.
 
  


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
vsFTPd - SSL connection and dynamic SSL ports toxoplasme Linux - Server 11 08-22-2008 10:50 PM
[ERROR] Setting up courier-imap-ssl c0nsur Linux - Newbie 5 10-01-2007 08:19 AM
Setting Up SSL for Giganews fred57 Linux - Security 3 12-20-2006 02:20 AM
Recommendations for setting up anonymous ssl proxy ? swedish_lunacy Linux - Software 3 07-27-2006 12:22 PM
LXer: Setting up an SSL server with Apache2 LXer Syndicated Linux News 0 02-12-2006 09:31 PM

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

All times are GMT -5. The time now is 06:55 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