title: Nginx location: 403 error / File not found
body: <p>I set up my domain on my server using nginx. So far so good my homepage works. But now I wanna add some locations for later test of programming. My plan is to call diffrent projects like mydomain.com/php/myprogramm.php</p>
  
  <p>So I add some folder in  <strong>/var/www/mydomain.com/php</strong>   (my side <strong>index</strong> is in <strong>/var/www/mydomain.com/html</strong>)</p>
  
  <p>Entering <strong>www.mydomain.com/php/</strong> leads to an <strong>403 error</strong> and <strong>mydomain.com/php/myprogramm.php</strong> says <strong>File not found</strong>...</p>
  
  <p>this is my nginx file:</p>
  
  <pre><code>server {
  listen 80 default_server;
  #listen [::]:80 default_server ipv6only=on;
  
  # Make site accessible from http://localhost/
  server_name mydomain.com www.mydomain.com;
  
  location / {
      root /var/www/mydomain.com/html;
      index index.html index.htm;
  }
  
  location /php/ {
      root /var/www/mydomain.com;
  }
  
  location /js/ {
      root /var/www/mydomain.com;
  }
  
  location /node/ {
      root /var/www/mydomain.com;
  }
  
  # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  #
  location ~ \.php$ {
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  #   # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  #
  #   # With php5-cgi alone:
  #   fastcgi_pass 127.0.0.1:9000;
  #   # With php5-fpm:
  fastcgi_pass unix:/var/run/php5-fpm.sock;
  fastcgi_index index.php;
  include fastcgi_params;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Of course when I set up my domain I also set <strong>sudo chown -R www-data:www-data /var/www/mydomain.com/html</strong> and <strong>sudo chmod 755 /var/www</strong></p>
  
  <p>Some ideas someone? :/</p>