title: nginx configuration, avoid codeigniter rewrite rules
body: <p>This is nginx rewrite rule for codeigniter.
  We can find this easily with googling.</p>
  
  <pre><code>server
  {
      server_name .example.com;
  
      access_log /var/log/nginx/example.com.access.log;
  
      root /var/www/example.com/html;
  
      index index.php index.html index.htm;
  
      # enforce www (exclude certain subdomains)
  #   if ($host !~* ^(www|subdomain))
  #   {
  #       rewrite ^/(.*)$ $scheme://www.$host/$1 permanent;
  #   }
  
      # enforce NO www
      if ($host ~* ^www\.(.*))
      {
          set $host_without_www $1;
          rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
      }
  
      # canonicalize codeigniter url end points
      # if your default controller is something other than "welcome" you should change the following
      if ($request_uri ~* ^(/welcome(/index)?|/index(.php)?)/?$)
      {
          rewrite ^(.*)$ / permanent;
      }
  
      # removes trailing "index" from all controllers
      if ($request_uri ~* index/?$)
      {
          rewrite ^/(.*)/index/?$ /$1 permanent;
      }
  
      # removes trailing slashes (prevents SEO duplicate content issues)
      if (!-d $request_filename)
      {
          rewrite ^/(.+)/$ /$1 permanent;
      }
  
      # removes access to "system" folder, also allows a "System.php" controller
      if ($request_uri ~* ^/system)
      {
          rewrite ^/(.*)$ /index.php?/$1 last;
          break;
      }
  
      # unless the request is for a valid file (image, js, css, etc.), send to bootstrap
      if (!-e $request_filename)
      {
          rewrite ^/(.*)$ /index.php?/$1 last;
          break;
      }
  
      # catch all
      error_page 404 /index.php;
  
      # use fastcgi for all php files
      location ~ \.php$
      {
          fastcgi_pass 127.0.0.1:9000;
          fastcgi_index index.php;
          fastcgi_param SCRIPT_FILENAME /var/www/example.com/html$fastcgi_script_name;
          include fastcgi_params;
      }
  
      # deny access to apache .htaccess files
      location ~ /\.ht
      {
          deny all;
      }
  }
  </code></pre>
  
  <p>I want to add normal php project in this server.
  The project's root directory is <code>/var/www/another/proj_new</code>.</p>
  
  <p>As I mentioned, this new project do not use codeigniter frame.
  This is normal php file project. So it doesn't need Codeigniter rewrite rule.</p>
  
  <p>So, my question is is possible that I can access the new project through the web.</p>
  
  <p>the address may be like this:</p>
  
  <pre><code>http://example.com/proj_new
  </code></pre>
  
  <p>This address should not call codeigniter's proj_new controller.</p>
  
  <p>I've tried to add this setting : </p>
  
  <pre><code>server
      {
          ....
          ....
          ....
  
          localhost /proj_new {
              root     /var/www/another/proj_new
              index    index.php
          }
  
          ....
          ....
          ....
      }
  </code></pre>
  
  <p>but, <code>http://example.com/proj_new</code> 
  makes 404 error pages.</p>