[mod_python] Disable .py file serving in Apache

Sébastien Arnaud arnaudsj at mac.com
Thu Jan 6 00:12:37 EST 2005


Hi,

I am running blank tonight on this simple question: "How can I make 
sure that apache will never serve a .py file as is?"

I have a config like this:

	<Directory /my/dir/>
			DirectoryIndex index.htm
			AddHandler mod_python .html
			PythonHandler ZPYWmc
			[...]
			PythonDebug On
			PythonAutoReload On
	</Directory>

Basically all the .html will be looking at my handler ZPYWmc.py to know 
what to do. All the .htm will be served as normal static files in 
/my/dir. How can I make sure Apache does not serve /my/dir/ZPYWmc.py 
from a simple HTTP request and show my source code to the world?

Thanks!

Sébastien


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 155 bytes
Desc: This is a digitally signed message part
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050105/6d884372/PGP.bin


More information about the Mod_python mailing list