title: How to rewrite if file not found using NGINX
body: <p>I'm using NGINX On Ubuntu server. I have this vhost:</p>
  
  <pre><code>server {
          listen        80;
          server_name   *.example.com;
          root          /home/nginx/vhosts/example.com/web;
  
          location / {
                  index     index.php;
          }
  
          location ~ \.php$ {
                  fastcgi_pass   127.0.0.1:9001;
                  fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                  include        /etc/nginx/fastcgi_params;
          }
  }
  </code></pre>
  
  <p>I have to add a rule...</p>
  
  <p><strong>If the file/dir IS NOT FOUND use index.php</strong></p>
  
  <p>How could I change my server {} directive?</p>
  
  <p>Thank you!</p>