Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to do http to https redirect for sickbeard using nginx 1.6.0 on Ubuntu 14.04 and it doesn't work.

Here's the config for sickbeard:

upstream sickbeard  {
  server localhost:8081;

server {
  listen *:80;         
  server_tokens off;
  root /nowhere; 
  rewrite ^ https://$server_name$request_uri? permanent;

server {
  listen 443 ssl;
  server_tokens off;

  ssl on;
  ssl_protocols       SSLv3 TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers         AES128-SHA:AES256-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
  ssl_session_cache   shared:SSL:10m;
  ssl_session_timeout 10m;
  ssl_certificate      server.crt;
  ssl_certificate_key  server.key;

  location / {
    proxy_pass  http://sickbeard;
    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
    proxy_redirect off;
    proxy_buffering off;
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;

So works, doesn't (it times out).

Any ideas why?


share|improve this question

I managed to get it to work. I had to add the following line in /etc/hosts:    sb
share|improve this answer
Thanks for this. It helped me with my own config. – Vasili Syrakis Apr 29 '14 at 9:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.