Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a problem.

The server contains the certificate (.crt). And there are two different users. One is set in the browser certificate (.p12), which signed the server certificate. The user enters the folder

A user who doesn't have a certificate enters

How to do it using the settings apache? Redirect?

Sorry for my English :)

share|improve this question

closed as not a real question by Michael Hampton, Magellan, EightBitTony, voretaq7 Oct 19 '12 at 19:12

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I can't quite figure out what you're asking here. Can you rephrase it, preferably with a table of the URLs, expected results and actual results? – Ladadadada Oct 15 '12 at 13:57
up vote 1 down vote accepted

If I understand you correctly, you could use mod_rewrite for this. I've not tested the config below, but it's a place for you to start from...

In the SSL settings, you use

SSLVerifyClient optional
SSLOptions +StdEnvVars

This means that you will allow clients to use authentication if they are able to, but you'll allow them to connect even if they can't. In order for this to work, you also need to trust the CA that has issued the client certificate; this is done by adding

SSLCACertificateFile path/to/file

to your config and having the certificate for the CA in that file.

Then, you use mod_rewrite to check for an environment variable that gets set by a client with a certificate you approve:

 RewriteEngine on
 RewriteRule   ^/(.*) /a/(.*) [L]

 RewriteRule   ^/(.*) /b/(.*) [L]
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.