<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Per location ssl_verify_client</title>
<description>Hello,

I have a website with both frontend and backend in ssl.

The frontend is allowed for everybody.

But I wish the backend be allowed only with a valid client certificate.
It's url is something like that :
https://www.my_website.com/admin

I'm trying the following config :
location /admin/ { ## Allow admins only to view admin page
ssl_verify_client on;
ssl_verify_depth 1;
}

But NginX 1.0.5 complains : 
nginx: [emerg] &amp;quot;ssl_verify_client&amp;quot; directive is not allowed here

With apache, you can set ssl_verify_client on a per location basis...

Regards,
Eloril</description><link>http://forum.nginx.org/read.php?10,214169,214169#msg-214169</link><lastBuildDate>Fri, 24 May 2013 18:08:19 -0400</lastBuildDate>
<generator>Phorum 5.2.16</generator>
<item>
<guid>http://forum.nginx.org/read.php?10,214169,220578#msg-220578</guid>
<title>Re: Per location ssl_verify_client</title><link>http://forum.nginx.org/read.php?10,214169,220578#msg-220578</link><description><![CDATA[Hello,<br /><br />No, it's not 2 SSL certs tied to the same IP. I have one SSL certificate installed, and one server certificate to verify clients (the &quot;ssl_verify_client on&quot; instruction).<br /><br />To connect to the public part of the website, no client certificate are required, but to view some specials pages, a client certificate is mandatory.<br /><br />With Apache, you can for the root location indicate that there is no verification, and for some locations, you can indicate that client verification is required. When the user browse from one location without verification to one with verification required, apache makes a ssl renegotiation.<br /><br />With Nginx it is impossible, due to the fact it doesn't support (yet) path based client ssl verification.<br /><br />I have tried the solution proposed by Igor Sysoev : http://forum.nginx.org/read.php?29,173747<br /><br />But with some browser, clients cannot connect to the public part of the website.<br /><br />Path based client ssl verification with NginX will be huge improvement for me.<br /><br />Regards,<br />Eloril]]></description>
<dc:creator>eloril</dc:creator>
<category>Ideas and Feature Requests</category><pubDate>Wed, 28 Dec 2011 04:11:42 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?10,214169,220531#msg-220531</guid>
<title>Re: Per location ssl_verify_client</title><link>http://forum.nginx.org/read.php?10,214169,220531#msg-220531</link><description><![CDATA[I'm a little confused. You want 2 SSL certs tied to the same IP? One for /admin/ and one for everything else?]]></description>
<dc:creator>trojan2748</dc:creator>
<category>Ideas and Feature Requests</category><pubDate>Tue, 27 Dec 2011 05:22:56 -0500</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?10,214169,217529#msg-217529</guid>
<title>Re: Per location ssl_verify_client</title><link>http://forum.nginx.org/read.php?10,214169,217529#msg-217529</link><description><![CDATA[Hello,<br /><br />I have tried the solution proposed by Igor Sysoev :<br />http://forum.nginx.org/read.php?29,173747<br /><br />Despite the fact it can be a little tricky with php-fpm, I did it.<br /><br />After a phase of testing, I applied it on a production server... but some times it doesn't work at all and the website is totally anavailable !<br /><br />When you set<br />ssl_verify_client optional;<br /><br />and do something like that<br />location ^~ /my_private_directory { ## Allow admins only to view admin page<br />if ($ssl_client_verify != SUCCESS) {<br />return 403;<br />break;<br />}<br />fastcgi_param HTTPS $fastcgi_https;<br />fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br />include fastcgi_params;<br />if ($request_filename ~ .php$) {<br />expires off; ## Do not cache dynamic content<br />fastcgi_pass unix:/tmp/php-fpm.sock;<br />}<br />}<br /><br />then with Firefox and Chrome it is always ok, but with safari (for windows) it is not the case. If another certificate is installed on the user machine, then Safari display the certificate dialog to choose a certificate... Despite the fact no valid certificate are available !!!<br /><br />I have some users with ie6 that have complained this is also the case sometime...<br /><br />Please allow a per location ssl_verify_client (like apache).<br /><br />Regards,<br />Eloril]]></description>
<dc:creator>eloril</dc:creator>
<category>Ideas and Feature Requests</category><pubDate>Sat, 29 Oct 2011 17:45:36 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?10,214169,214430#msg-214430</guid>
<title>Re: Per location ssl_verify_client</title><link>http://forum.nginx.org/read.php?10,214169,214430#msg-214430</link><description><![CDATA[I understand it is somehow difficult... But it can be very useful.<br /><br />Sometimes you don't have the choice to create another domain or make the check at application level. In fact I don't have the choice, but I have to protect the admin directory...<br /><br />As far as I understand, client and server do a renegotiation regularly, when the session cache expires... Then the server can perform a secure renegotiation on a per location basis relatively easily. I believe that for a server like NginX, which is very well programmed, it can be done quickly.<br /><br />I'm sure a per location client certificate requirement can be a real asset in NginX.<br /><br />Now, I'm evaluating NginX. I wish to migrate from apache (which supports this), but it is a real big issue for me.<br /><br />Regards,<br />Eloril]]></description>
<dc:creator>eloril</dc:creator>
<category>Ideas and Feature Requests</category><pubDate>Mon, 29 Aug 2011 08:28:37 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?10,214169,214277#msg-214277</guid>
<title>Re: Per location ssl_verify_client</title><link>http://forum.nginx.org/read.php?10,214169,214277#msg-214277</link><description><![CDATA[path based client ssl verification is messy as it requires the client/server to do a (secure) renegotiation.<br /><br />You're better off doing a separate domain or make it ssl_verify_client optional at the top level and check the compliance at application level.]]></description>
<dc:creator>daniel.b</dc:creator>
<category>Ideas and Feature Requests</category><pubDate>Thu, 25 Aug 2011 00:38:52 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?10,214169,214169#msg-214169</guid>
<title>Per location ssl_verify_client</title><link>http://forum.nginx.org/read.php?10,214169,214169#msg-214169</link><description><![CDATA[Hello,<br /><br />I have a website with both frontend and backend in ssl.<br /><br />The frontend is allowed for everybody.<br /><br />But I wish the backend be allowed only with a valid client certificate.<br />It's url is something like that :<br />https://www.my_website.com/admin<br /><br />I'm trying the following config :<br />location /admin/ { ## Allow admins only to view admin page<br />ssl_verify_client on;<br />ssl_verify_depth 1;<br />}<br /><br />But NginX 1.0.5 complains :<br />nginx: [emerg] &quot;ssl_verify_client&quot; directive is not allowed here<br /><br />With apache, you can set ssl_verify_client on a per location basis...<br /><br />Regards,<br />Eloril]]></description>
<dc:creator>eloril</dc:creator>
<category>Ideas and Feature Requests</category><pubDate>Tue, 23 Aug 2011 05:11:26 -0400</pubDate></item>
</channel>
</rss>