title: Nginx as proxy for Lighttpd
body: <p>I try have django server with nginx + gunicorn and lighttpd for php. How i should configure nginx to be proxy for my subdomain to lighttpd?</p>
  
  <p>for eg. </p>
  
  <p>myawesomesite.com => dajango website (work)</p>
  
  <p>cloud.myawesomesite.com => lighttpd php server (don't work)</p>
  
  <p>i actually trying </p>
  
  <pre><code>server {
      listen 80;
      server_name cloud.awesome.eu; 
  location / {
         proxy_pass http://127.0.0.1:8080;
         #root /var/www;
      }
  }
  </code></pre>
  
  <p>And for ssl</p>
  
  <pre><code>server {
      listen 443 ssl;
      #ssl on;
      server_name cloud.awesome.eu;
      #root /var/www; 
      #ssl_certificate /etc/nginx/ssl/server.crt;
      #ssl_certificate_key /etc/nginx/ssl/server.key;
      index index.php;
      try_files $uri $uri/ /index.php?q=$uri&amp;$args;
       location / {
          proxy_pass  http://127.0.0.1:8080;
          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            cloud.awesome.com;
          proxy_set_header        X-Real-IP       $remote_addr;
          proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
      }
  
  }
  </code></pre>
  
  <p>All config examples is for nginx + apache.. i Dont found example for nginx + lighttpd.</p>
  
  <p>Sorry for my terrible english :)</p>