SSL client certyficage

Jim Ohlstein jim at ohlste.in
Tue Mar 28 04:17:14 UTC 2017


Hello,

On 3/27/17 4:28 PM, piroaa wrote:
> Hi.
> I have own cloud server with ssl client cert verification ssl_verify_client
> set to on. How I can disable verification for location/index.php/s/ share
> links ?
>

try setting ssl_verify_client to optional and use the built in variable 
"ssl_client_verify".

Something like this (not tested):

server {

	...

	ssl_client_certificate /path/to/client.crt;
	ssl_verify_client optional;

	## Unprotected part of site
	location ^~ /path/to/shared/links {
		...
	}

	## Protected part of site
	location ~ /main/site
			
		if ($ssl_client_verify != SUCCESS) {
		   return 403;
		}

		...
	}

-- 
Jim Ohlstein


"Never argue with a fool, onlookers may not be able to tell the 
difference." - Mark Twain


More information about the nginx mailing list