Score:0

"Require expr" Apache expression under nginx

ec flag

How can the following Apache config snippet be translated to nginx?

<Directory "/usr/local/var/www/client2">
  SSLOptions +StdEnvVars +ExportCertData
  SSLVerifyClient require
  SSLVerifyDepth 2

  <RequireAll>
    Require expr %{SSL_CLIENT_S_DN_O} == 'My Company'
  </RequireAll>
</Directory>

More specifically:

  • Is there an equivalent of Require expr under nginx?
  • How can the O field of a client cert be extracted? nginx has this variable $ssl_client_s_dn defined, is there any straightforward way to extract the subfield (other than integrating with Lua scripting) ?

any insight appreciated,

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.