title: 403 forbidden of nginx in ubuntu
body: <p>I have read <a href="http://nginx.org/en/docs/beginners_guide.html" rel="nofollow">beginner's guide of nginx</a>:</p>
  
  <pre><code>server {
      location / {
          root /data/www;
      }
  
      location /images/ {
          root /data;
      }
  }
  </code></pre>
  
  <p><a href="http://localhost/images/example.png" rel="nofollow">http://localhost/images/example.png</a> -> /data/images/example.png</p>
  
  <p><a href="http://localhost/some/example.html" rel="nofollow">http://localhost/some/example.html</a> -> /data/www/some/example.html</p>
  
  <p>So my nginx configuration：           </p>
  
  <pre><code> server {
              listen 443;
              server_name localhost;
              ssl on;
              ssl_certificate /home/attolee/sslkey/example.crt;
              ssl_certificate_key /home/attolee/sslkey/example.key;
              ssl_session_timeout 5m;
              ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
              ssl_ciphers ALL:!ADH:!EXPORT56:-RC4+RSA:+HIGH:+MEDIUM:!EXP;
              ssl_prefer_server_ciphers on;
  
              location / {
                      root /home/attolee;
                      index index.html;
              }
  
              location /hi/ {
                      root /home/attolee;
                      index hi.html;
              }
     }
  </code></pre>
  
  <p>I want</p>
  
  <ol>
  <li><a href="https://host/" rel="nofollow">https://host/</a> access to /home/attolee/index.html，</li>
  <li><a href="https://host/hi/" rel="nofollow">https://host/hi/</a> access to /home/attolee/hi/hi.html，</li>
  </ol>
  
  <p>Now 1 work, 2 failed, 403 forbidden.</p>
  
  <p>error log tells me is <code>13: Permission denied</code>.</p>
  
  <p>So I check own and group of /home/attolee and /home/attolee/hi/, as well as hi.html.</p>
  
  <pre><code>drwxr-xr-x  6 attolee attolee 4096 Nov  2 17:08 attolee/
  drw-rw-rw- 2 root    root    4096 Nov  2 17:12 hi/
  -rw-rw-rw- 1 root    root      24 Nov  2 17:12 hi.html
  </code></pre>
  
  <p>then check the nginx process USER property using htop is root.</p>
  
  <p>how to fix this?</p>