phppythonapachemod-pythonmod-php

How do mod_php, mod_python, mod_Language work


Some of the Apache modules are related to programming languages, like mod_php and mod_python. The description is basically "enables usage of php within apache" or "enables usage of python within apache". I'm trying to understand an overview of how these types of "language" modules work.


Solution

  • Basically, if you install and configure mod_php correctls, a php file inside an apache DirectoryRoot will be executed. Mod_python works similarly.

    If you install apache without mod_php and you have foo.php at the root of your htdocs folder then http://yourdomain/foo.php will treat the document as a plain text file. Installing and configuring mod_php will cause the script to be parsed as a php script, and the output to be sent to the browser as opposed to the raw text..

    Justin