Using apache for only mod_wsgi

46 views
Skip to first unread message

Jason Garber

unread,
Sep 27, 2012, 2:44:38 AM9/27/12
to mod...@googlegroups.com
Hello,

We are using nginx on the front-end to serve static files, and pass only non-static requests through to apache.

Furthermore, we are using 
   WSGIScriptAlias /
to capture all requests sent to apache and send them to our python framework.

Is there a simple way in apache to cause it to *never* serve any files (rendering it useless for anything but WSGIScriptAlias) ?

I understand that with WSGIScriptAlias /, it will not, but I was looking for a failsafe, in the event of an application that did not do that, or was misconfigured.

Thanks!
JG

Gnarlodious

unread,
Sep 27, 2012, 7:50:50 AM9/27/12
to mod...@googlegroups.com
I have a block like this in .htaccess, which makes Python scripts invisible and if somehow they are requested causes error 403 Forbidden:

<FilesMatch "\.(py|pyc)$">
 Order Allow,Deny
 Deny from all
 AddDefaultCharset UTF-8
 DefaultLanguage en-US
</FilesMatch>

-- Gnarlie
Reply all
Reply to author
Forward
0 new messages