title: error when setting up Rstudio with Nginx proxy server
body: <p>I have Rstudio running on my desktop, and I can access it from the web at <a href="http://my.desktop:8787" rel="nofollow">http://my.desktop:8787</a>.</p>
  
  <p>From the <a href="http://rstudio.org/docs/server/running_with_proxy" rel="nofollow">Rstudio documentation</a>, it appears that setting up a reverse proxy is a prudent security measure (please correct me if I am wrong). </p>
  
  <p>I am using Ubuntu 11.04</p>
  
  <p>In following the instructions for that page, I have installed ngnix and added the code snippets to <code>/etc/nginx/nginx.conf</code>:</p>
  
  <pre><code>http {
    server {
      listen 80;
  
      location / {
        proxy_pass http://localhost:8787;
        proxy_redirect http://localhost:8787/ $scheme://$host/;
      }
    }
  }
  </code></pre>
  
  <p><code>sudo nginx restart -v</code> returns the following error: </p>
  
  <pre><code>nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  </code></pre>
  
  <p>Furthermore, if I include the following snippet (so that the link is to /rstudio instead of :8787):</p>
  
  <pre><code>location /rstudio/ {
    rewrite ^/rstudio/(.*)$ /$1 break;
    proxy_pass http://localhost:8787;
    proxy_redirect http://localhost:8787/ $scheme://$host/rstudio/;
  }
  </code></pre>
  
  <p><code>sudo nginx restart -v</code> returns the following error: </p>
  
  <pre><code>Restarting nginx: nginx: [emerg] unknown directive "location" in 
  /etc/nginx/nginx.conf:93
  </code></pre>
  
  <p>I have two questions: </p>
  
  <ol>
  <li>How necessary is a reverse proxy server if I use a strong password?</li>
  <li>How can I get past these errors?</li>
  </ol>