Enabeling SSL causes Redirect Loop errors ???

doughboy nginx-forum at nginx.us
Tue Sep 13 02:10:42 UTC 2011


I am new to Nginx but learning every day.  I have the server setup
nicely and the regular webpages serve up fine.  I have multiple IP's on
the server (less than 20) and I am trying to enable SSL for 3 different
sites (each on a different IP).  I have read for hours looking at
examples and trying many different things to see if I can get the SSL
pages to serve up and no luck.  I am hoping someone can help me. 
Running debian lenny, nginx 1.0.6, php 5.3.8, php-fpm,   I am only
wanting to run one domain SSL per IP,  (Bogus domain name has been
inserted below)
-------------------------------------------------
nginx.conf

user www-user;
worker_processes 4;
pid /var/run/nginx.pid;



events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 60 60;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;
        gzip_disable "msie6";

        gzip_vary on;
        # gzip_proxied any;
        gzip_comp_level 6;
        gzip_buffers 16 8k;
        gzip_http_version 1.1;
        gzip_types text/plain text/css application/json
application/x-javascript text/xml application/xml application/xml+rss
text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}

-----------------------------------------------------------
> include /etc/nginx/conf.d/*.conf;

There NO conf files located in the above folder.  I have not set up any
site specific conf files yet.

------------------------------------------------------------
vhost entry (one try)

server {
        listen 80;
        listen 206.201.217.7:443 ssl;
        server_name www.luvinlife.com luvinlife.com;

        ssl_certificate /usr/nginx/certs/luvinlife.pem;
        ssl_certificate_key /usr/nginx/certs/luvinlife.key;

        client_max_body_size 5m;

        root /var/www/luvinlife.com/public_html;
        try_files $uri $uri/ /index.php?$args;
        index index.html index.php;

        location ~ \.php$ {
            #fastcgi_pass       unix:/var/run/php5-fpm.sock;
            fastcgi_pass        127.0.0.1:9000;
            fastcgi_index       index.php;
            include             fastcgi_params;
            fastcgi_param       SCRIPT_FILENAME
$document_root$fastcgi_script_name;
        }
}

-------------------------------------------------
version check :

nginx: nginx version: nginx/1.0.6
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/etc/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi
--lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid
--with-debug --with-http_addition_module --with-http_dav_module
--with-http_geoip_module --with-http_gzip_static_module
--with-http_image_filter_module --with-http_realip_module
--with-http_stub_status_module --with-http_ssl_module
--with-http_sub_module --with-http_xslt_module --with-ipv6
--with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl
--with-mail --with-mail_ssl_module
--add-module=/usr/src/nginx/source/nginx-1.0.6/debian/modules/nginx-echo
--add-module=/usr/src/nginx/source/nginx-1.0.6/debian/modules/nginx-upstream-fair

----------------------------------------------

SSL Page Error message:

The webpage at https://www.luvinlife.com/index.php/customer/account/ has
resulted in too many redirects. Clearing ......

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,215136,215136#msg-215136



More information about the nginx mailing list