title: Zend Framework: The requested URL /my/path was not found on this server
body: <p>I am total new to Zend Framework.</p>
  
  <p>I wrote a simple web service that return mock XML data with Zend Framework, with module structure like this:</p>
  
  <pre><code>AppName
      application
          configs
              application.ini
          modules
              default
                  .....
              api
                  controller
                      CatalogController.php
                  view
          library
          public
              .htaccess
              index.php
          tests
  </code></pre>
  
  <p>In localhost (windows 7), these are working :</p>
  
  <p><a href="http://localhost" rel="noreferrer">http://localhost</a></p>
  
  <p><a href="http://localhost/api/catalog" rel="noreferrer">http://localhost/api/catalog</a></p>
  
  <p><a href="http://localhost/default" rel="noreferrer">http://localhost/default</a></p>
  
  <p>in my production server (linux), I get '404 file not found' from: </p>
  
  <p><a href="http://107.22.255.126/api/catalog" rel="noreferrer">http://107.22.255.126/api/catalog</a></p>
  
  <p><a href="http://107.22.255.126/default" rel="noreferrer">http://107.22.255.126/default</a></p>
  
  <p>but this is working</p>
  
  <p><a href="http://107.22.255.126" rel="noreferrer">http://107.22.255.126</a></p>
  
  <p>I host it in Amazon Web Services.</p>
  
  <p>Here is my .htaccess</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^.*$ index.php [NC,L]
  </code></pre>
  
  <p>Here is my application.ini</p>
  
  <pre><code>[production]
  phpSettings.display_startup_errors = 0
  phpSettings.display_errors = 0
  includePaths.library = APPLICATION_PATH "/../library"
  bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
  bootstrap.class = "Bootstrap"
  appnamespace = "Application"
  //resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
  resources.frontController.params.displayExceptions = 0
  resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
  resources.modules[] = "default"
  resources.modules[] = "api"
  resources.layout.layoutPath = APPLICATION_PATH "/layouts"
  resources.layout.layout = master
  
  [staging : production]
  
  [testing : production]
  phpSettings.display_startup_errors = 1
  phpSettings.display_errors = 1
  
  [development : production]
  phpSettings.display_startup_errors = 1
  phpSettings.display_errors = 1
  resources.frontController.params.displayExceptions = 1
  </code></pre>
  
  <p>Here is my Bootstrap.php</p>
  
  <pre><code>&lt;?php
  
  class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
  {
  
      protected function _initRoutes()
      {
          $front = Zend_Controller_Front::getInstance();
          $router = $front-&gt;getRouter();
          $restRoute = new Zend_Rest_Route($front, array(), array('api'));
          $router-&gt;addRoute('api', $restRoute);
      }
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>I had run out of idea. I suspect this is something related with router in bootstraper, but can't find any solution.</p>