Welcome! Log In Create A New Profile

Advanced

Re: nginx for multiple sub-domain?

May 20, 2011 02:02PM
On Fri, May 20, 2011 at 07:14:44PM +0200, Yanxin Z. wrote:
> Hello,
> I have a web site, e.g., www.example.com
> under it, i have several sub-domains, e.g., /register, /query, /report.
>
> I have a requirement that,
> /query is for port 80
> /register is for port 443, but with server side SSL certificate
> verification.
> /report is for port 443 , with both server and client side SSL
> certificate verification.
>
> I want to know whether NGX config can do this ?
>
>
> I have the problem to config /register and /report under port 443.

server {
listen 80;
server_name www.example.com;
location /query {
...
}
}

server {
listen 443;
server_name www.example.com;

ssl on;
ssl_certificate www.nginx.com.crt;
ssl_certificate_key www.nginx.com.key;

ssl_verify_client optional;
ssl_client_certificate CA.crt;

location /register {
...
}

location /report {
if ($ssl_client_verify != SUCCESS) {
return 403;
}
...
}
}

http://nginx.org/en/docs/http/configuring_https_servers.html


--
Igor Sysoev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx for multiple sub-domain?

Yanxin Z. May 20, 2011 01:16PM

Re: nginx for multiple sub-domain?

Igor Sysoev May 20, 2011 02:02PM

Re: nginx for multiple sub-domain?

Yanxin Z. May 20, 2011 02:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 249
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready