Hi there,
I have a problem. I have migrated an app from rackspace to a new location that i have no control over the firewall/loadbalancer. The app requires all traffic to be https. So i am using the rewrite feature which worked before when it was sitting behing a HAProxy. Basically now that i am sitting behind the f5, when i try to redirect to https it goes into a loop. The f5 now handles my ssl cert so do i need it https enabled in the nginx config? I have it turned off. I am stumped.
here is my config.
passenger_root /usr/lib/passenger-4.0.5;
passenger_ruby /usr/bin/ruby1.8;
server {
listen 80;
server_name blahweddings.blahlabs.com;
#return 301 https://blahweddings.blahlabs.com$request_uri;
# rewrite ^ https://$host$request_uri? permanent;
rewrite ^http:// https://$host$request_uri? permanent;
# rewrite ^http:// https://blahweddings.blahlabs.com permanent;
access_log /var/log/nginx/blahweddings.access.log combined;
error_log /var/log/nginx/blahweddings.error.log;
root /srv/blahweddings/current/public;
passenger_enabled on;
rails_env production;
}
#server {
# listen 443;
# server_name blahweddings.blahlabs.com;
#
# access_log /var/log/nginx/blahweddings.access.log combined;
# error_log /var/log/nginx/blahweddings.error.log;
#
# ssl on;
# ssl_certificate /etc/ssl/certs/wildcard.blahlabs.com.pem;
# ssl_certificate_key /etc/ssl/private/wildcard.blahlabs.com.key;
# keepalive_timeout 70;
# add_header Front-End-Https on;
#
# root /srv/blahweddings/current/public;
# passenger_enabled on;
# rails_env production;
#}
Thanks in advance.