Following is my server block. I am using client certificate for controlling access to the webservice. Everything works fine if I access the service as https://domain.com/TEST. But if I try to access as https://xxx.x.xx.xxx/TEST (i.e. using IP address instead of domain mame) I get an error saying "required SSL certificate was not sent" even though I am sending exact same certificate. What's wrong with my configuration?

server {
    listen   443; ## listen for ipv4; this line is default and implied
    #listen   [::]:80 default ipv6only=on; ## listen for ipv6

    server_name xxx.x.xx.xxx www.domain.com domain.com;
    access_log /usr/www/domain/logs/access.log;
    error_log /usr/www/domain/logs/error.log;

    ssl on;
    ssl_certificate /opt/nginx/ssl/server.crt;
    ssl_certificate_key /opt/nginx/ssl/server.key;
    ssl_client_certificate /opt/nginx/ssl/cacert.pem;
    ssl_verify_client on;
    ssl_session_timeout 5m;

    ssl_protocols SSLv3 TLSv1;
    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
    ssl_prefer_server_ciphers on; 

    rewrite ^/REGISTER$ /register.php break;
    rewrite ^/TEST$ /test.php break;

    location / { 
            root /usr/www/domain/public_html;
            try_files $uri $uri/ @node;

            expires max;
            access_log off;

    location @node {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        location ~ \.php$ {
                root /usr/www/domain/public_html;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param  VERIFIED $ssl_client_verify;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;


You must log in to answer this question.

Browse other questions tagged .