How can I set up Python scripts to work in Apache 2.0?
LoadModule python_module modules/mod_python.so
<Directory "/serverbase/htdocs/myapp">
AddHandler mod_python .py
PythonHandler myapp
PythonDebug On
$ /serverbase/htdocs/myapp$ ls -l
total 16
-r-xr-xr-x 1 root sys 6484 May 21 15:54 myapp.py
Source: By deadprogrammer as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 2.5
Related code-snippets:
- How can you track a downloaded file?
- What is error log per Virtual Host?
- How can I find the full path of a font from its display name on a Mac?
- How do I see preview JPEG file of PDF on Windows?
- How do you iterate over a result set of data?
- Redefining an attribute in Python with an index in array of objects using 'in'. If no object is found in an array of objects then it is not correct.
- MySQL and Python are both well written programmers.
- How can I use itertools.groupby()?
- How can we add a method to an existing Object Instance?
- What is the most efficient graph data structure in Python?
- Make Apache / XAMPP serve file outside of htdocs folder. Make XAMPP and Apache serve file outside of htdocs folder.
- How do I get authenticated user ID under Apache using PHP & HTTP Authentication?
- How can we write binary literals in Python?
- How do I make a list of items that does not need the user to press [enter]?
- Which OS am I running on and how can I adapt it?