Changes between Initial Version and Version 1 of Ticket #184, comment 1


Ignore:
Timestamp:
07/02/12 08:10:19 (12 years ago)
Author:
Ruslan Ermilov

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #184, comment 1

    initial v1  
    33For "/", when rewrite gets to @cgicache by following 418 returns, it executes the "set" directive and stops. Since no "if" selected another configuration, and no "break" was used, a changed uri then matches the "/" location and is processed with the static file content handler.
    44
    5 By putting a "break" inside @cgicache tell rewrite to stop rewriting and assign a request the containing location.  And in this location, the content handler memcached.
     5By putting a "break" inside @cgicache you tell rewrite to stop rewriting and assign the request the configuration of containing location.  And in this location, the content handler is memcached.
    66
    7 Now, if you comment memcached but retain "break", the content handler is inherited from the implicit server location, which happens to be "index" content handler (since uri ends with "/"). Index first checks root+uri+index file, /my/root/showpage/index.html, fails, then tests if a directory exists (to return either 403 or 404), and since there's no directory, returns 404 which is then internally redirected to @cgipass. There, uri gets rewritten to /cgi-bin/showpage.fcg/, and rewrite module finishes. The uri then matches the "/" location with the static file handler, which is probably not what you wanted. But you already know how to solve it.
     7Now, if you comment out memcached but retain "break", the content handler is inherited from the implicit server location, which happens to be "index" content handler (since uri ends with "/"). Index first checks the root+uri+index file, /my/root/showpage/index.html, fails, then tests if its parent directory exists (to return either 403 or 404), and since there's no directory, returns 404 which is then internally redirected to @cgipass. There, uri gets rewritten to /cgi-bin/showpage.fcg/, and rewrite module stops. The uri then matches the "/" location with the static file handler, which is probably not what you wanted. But you already know how to solve it.
    88
    99The rules of how rewrite directives are processed can be found here: