From: Georg L. <jor...@ma...> - 2024-05-02 14:33:13
|
Hello, I am trying to configure Naviserver as reverse proxy for a Django project. Django features deployment of static assests like css, js etc. into a separate URL, typically /static, which can then be served directly by the webserver. Everything else has to be reverse-proxied to the wsgi server which serves the Django app via http. My revproxy setup is: ns_section ns/server/default { ns_param enabletclpages false ns_param minthreads 10 } ns_section ns/server/default/fastpath { ns_param pagedir www ns_param serverdir $serverroot/default ns_param directoryproc ns_returnnotfound ns_param directoryfile index.html } ns_section ns/server/default/modules { ns_param revproxy tcl ns_param nssock nssock } ns_section ns/server/default/module/revproxy { ns_param filters { ns_register_filter postauth GET /* ::revproxy::upstream -targethttp://localhost:65193 ns_register_filter postauth POST /* ::revproxy::upstream -targethttp://localhost:65193 } } ns_section ns/server/default/module/nssock { ns_param port 0 } I have made several attempts to register the /static/* URL to be handled by fastpath and map it to a directory have failed. The server always sends the requests to the revproxy backend. Is it possible to "override" this, and if yes then how? Best Regards, Georg |