InstallApache2OnWindows

From $1

Table of contents
[MISSING]

I want to make my apache config files as much like my UNIX config files as possible.

  1. Install apache_2.0.52-win32-x86-no_ssl.msi.
  2. * I chose no_ssl because of the smaller memory footprint.
  3. Custom Install
  4. Root element installs to C:\usr\local
  5. Runtime element installs to C:\usr\local\apache

After the install, edit httpd.conf:

  1. Change all of the "C:/" to "/"
  2. Enable the LoadModule for mod_info and mod_status

  3. ExtendedStatus On

  4. Enable: Location /server-status
    1. Also: Allow from all
  5. Enable: Location /server-info
    1. Also: Allow from all

Test perl CGI:

  1. Open a browser to http://localhost/cgi-bin/printenv.pl

  2. If IE wants to know whether to save or run printenv.pl, save it. For some reason, sometimes MIME type text/plain doesn't seem to make it to IE's brain.

Install mod_python:

  1. First install Python-2.3.4.exe to C:\python
  2. mod_python3.1.3_py2.3.exe
  3. Add to httpd.conf: LoadModule python_module modules/mod_python.so

  4. Save the following as /usr/local/apache/cgi-bin/mptest.py

from mod_python import apache

def handler(req):
    req.write("Hello World!")
    return apache.OK
  1. In httpd.conf, inside: _Directory "/usr/local/apache/cgi-bin"_, add

    AddHandler mod_python .py
    PythonHandler mptest
    PythonDebug On
  1. Stop and start apache
  2. "Test mod_python":http://localhost/cgi-bin/mptest.py

Tags:
none
 
Images (0)
 
Comments (0)
You must login to post a comment.