We have certificate installed on ELB provided by AWS certificate services, also a self signed certificate is configured on Nginx web server. Now, when user comes to https://www.example.org/ it says
www.example.org redirected you too many times. ERR_TOO_MANY_REDIRECTS
following is my nginx conf file
server {
listen 80;
listen 443 ssl;
server_name example.org www.example.org *.example.org;
access_log /var/www/example.org/logs/access.log;
error_log /var/www/example.org/logs/error.log;
root /var/www/example.org/httpdocs;
ssl_certificate /etc/nginx/ssl/new/example.org.crt;
ssl_certificate_key /etc/nginx/ssl/new/example.org.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location / {
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
}
location @handler {
rewrite / /index.php;
}
location ~ .php/ {
rewrite ^(.*.php)/ $1 last;
}
location ~ .php$ {
if (!-e $request_filename) { rewrite / /index.php last; }
expires off;
fastcgi_param HTTPS $fastcgi_https;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}