{"id":8389,"date":"2016-02-17T22:22:23","date_gmt":"2016-02-17T22:22:23","guid":{"rendered":"https:\/\/wp.okra.host\/article\/passenger-applications-do-not-inherit-htaccess-rules\/"},"modified":"2021-03-07T14:08:46","modified_gmt":"2021-03-07T13:08:46","slug":"passenger-applications-do-not-inherit-htaccess-rules","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/passenger-applications-do-not-inherit-htaccess-rules\/","title":{"rendered":"Passenger applications do not inherit htaccess rules"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p><a href=\"https:\/\/kb.okra.host\/de\/guides\/htaccess-guide\/\">.htaccess<\/a> files are used to control behaviors of applications by overriding global server configuration.\u00a0Any\u00a0<a href=\"https:\/\/kb.okra.host\/de\/cgi-passenger\/passenger-supported-apps\/\">Passenger-based<\/a> application, which includes Node, Python, and Ruby, will\u00a0stop processing rules beyond the <a href=\"https:\/\/kb.okra.host\/de\/web-content\/where-is-site-content-served-from\/\">Dokumentenstamm<\/a>, often noted by <a href=\"https:\/\/kb.okra.host\/de\/cgi-passenger\/passenger-application-layout\/\">convention<\/a> as <code>\u00f6ffentlich\/<\/code>.<\/p>\n<h2 id=\"cause\" >Ursache<\/h2>\n<p>Passenger is managed by a separate facility that immediately takes control of the request once Apache detects that the document root is a Passenger application. Existing .htaccess directives, if provided in the <a href=\"https:\/\/kb.okra.host\/de\/web-content\/where-is-site-content-served-from\/\">Dokumentenstamm<\/a>, are applied; however, any directives that lie below the document root (often noted as <code>\u00f6ffentlich\/<\/code>) are not inherited by design.<\/p>\n<p>This is reflected\u00a0by <em>apache2_module<\/em>\/<em><a href=\"https:\/\/github.com\/phusion\/passenger\/blob\/stable-5.0\/src\/apache2_module\/Hooks.cpp\">Hooks.cpp<\/a><\/em>: <code>passenger_register_hooks()<\/code>, which blocks <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_dir.html\">mod_dir<\/a> (<em>Hooks.cpp<\/em>:<code> startBlockingModDir()<\/code>) that would be responsible for index negotiation, and therefore fulfillment of the request and .htaccess inheritance.<\/p>\n<h2 id=\"solution\" >L\u00f6sung<\/h2>\n<p>.htaccess directives must be located immediately in the <a href=\"https:\/\/kb.okra.host\/de\/web-content\/where-is-site-content-served-from\/\">Dokumentenstamm<\/a> of the Passenger application. No known workarounds exist to recursively inherit rules.<\/p>","protected":false},"excerpt":{"rendered":"<p>Overview .htaccess files are used to control behaviors of applications by overriding global server configuration.\u00a0Any\u00a0Passenger-based application, which includes Node, Python, and Ruby, will\u00a0stop processing rules beyond the document root, often noted by convention as public\/. Cause Passenger is managed by a separate facility that immediately takes control of the request&#8230;<\/p>","protected":false},"author":1,"comment_status":"close","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[55],"ht-kb-tag":[],"class_list":["post-8389","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-cgi-passenger"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8389"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8389\/revisions"}],"predecessor-version":[{"id":8390,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8389\/revisions\/8390"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8389"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8389"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}