The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Certificate Expiry Dates srujana HP-UX 1 06-16-2008 02:35 AM
fetchmail imap gmail certificate c19h28O2 UNIX for Dummies Questions & Answers 13 03-11-2008 09:45 PM
Unix Certificate afuzile Forum Support Area for Unregistered Users & Account Problems 1 02-22-2006 07:17 AM
Mod_ssl patch for Apache server v2.0.49 e_jeffhang HP-UX 8 02-20-2006 05:20 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-16-2008
Esaia Esaia is offline
Registered User
  
 

Join Date: Jul 2002
Location: Sweden
Posts: 51
mod_ssl redirect to site if client does not have valid certificate

Hello!

I have setup a site to which users authenticate against with openssl certificates.
Everything works just fine, be I wish to be able to redirect to a error page with instructions instead of displaying the default error page that firefox displays.

How to? I got nothing out of google...

Best regards.
  #2 (permalink)  
Old 07-16-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,311
Firefox displays only the error page that has been configured in your (I guess) Apache. Check your httpd.conf or a related include file where errors are defined like for example:


Code:
...
ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
...

Also check the official Apache documentation:
Custom Error Responses - Apache HTTP Server
  #3 (permalink)  
Old 07-16-2008
Esaia Esaia is offline
Registered User
  
 

Join Date: Jul 2002
Location: Sweden
Posts: 51
Ah I'm sorry! yes its apache.
Ok I will look into this!
Thank you for your response!
  #4 (permalink)  
Old 07-21-2008
Esaia Esaia is offline
Registered User
  
 

Join Date: Jul 2002
Location: Sweden
Posts: 51
Hello again, I've looked in to the httpd.conf but I cant figure out which error code apache generates and how to fetch it into an event.

What I know is that the server sends "SSL_ERROR_HANDSHAKE_FAILURE_ALERT" to the client, but I dont know how to use that error code to display an error page.

Please help
  #5 (permalink)  
Old 07-21-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,311
Can you check the Apache's access_log (or whatever it's name it is for the access log in your config) - the should be entries like for example:

Code:
10.10.1.23 - - [17/Jul/2008:07:07:47 +0200] "GET /somedir HTTP/1.1" 401 1446

The 401 is the error code in this example which is what you can configure in your httpd.conf or include file for it, afaik.
When you reproduce that "SSL_ERROR_HANDSHAKE_FAILURE_ALERT" error, you should check what kind of entry you get added in the access log I mentioned above. Maybe you can write a directive for that then like mentioned in one of my former answers.
  #6 (permalink)  
Old 07-22-2008
Esaia Esaia is offline
Registered User
  
 

Join Date: Jul 2002
Location: Sweden
Posts: 51
Hello!

Ah now I get what you mean!

xx.xx.xx.xx - - [22/Jul/2008:09:04:07 +0200] "GET /wiki/index.php/Main_Page HTTP/1.1" 403 -

This is what I get, I've added the following line in my vhost entry:
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var

But no success yet.
  #7 (permalink)  
Old 07-22-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,311
What error do you get in the browser window and in the logs of the webserver?

I can't describe it further - I would have to test it myself, so you will have to look up examples and try around, sorry.

Is the ErrorDocument directive placed inside the <Directory></Directory>?

Here you find the details on that directive:
core - Apache HTTP Server
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0