Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tsobocan's avatar

Server configuration

Hey.

I went through many tutorials and I can't make server ask for client certificate. Where is the best way to add logic? Httpd.conf? Httpd-vhost? And exactly what if I want all pages but index to be protected?

0 likes
6 replies
tsobocan's avatar

I need to allow users to login with personal certificates (not sure how they are called). After they are logged they will create documents which will then have to be digitally signed (but that is another problem) .

tsobocan's avatar

@Snapey exactly! I asked this here just because of the community (and also because Laravel, :) its in server section anyway). I tried different options on apache but all failed. Will read your links and try to configure apache and then report back (sadly i will need same thing for nginx). Although I am not sure how can I validate client certificate without original issuer key. Maybe I am missing something. Anyway, I think this is interesting topic for all requiring this kind of authentication.

I am really surprised that amount of people working with this is so low. In my country we all have custom certificates for companies or for own use on government websites (for taxes or something).

Snapey's avatar

@tsobocan Most cases, you will be validating a self-signed certificate? I've only come across this the once and it was for the Royal Mail in the uk where all their client machines have a certificate installed. They needed my employer's (at the time) saas application to only allow users to connect that had the certificate. We politely refused.

tsobocan's avatar

@Snapey not self signed. There are a few issuers in the country (one by government operated, and two others). You cant get this certificate any where else.

Please or to participate in this conversation.