apache mod_python problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ido Yehieli

    #1

    apache mod_python problem

    Hi all,
    I have succesfully installed apache+mod_pyth on (ubuntu 5.10
    (Breezy),
    libapache2-mod-python2.4 Version: 3.1.3-3ubuntu1,
    apache2 Version: 2.0.54-5ubuntu4,
    python2.4 Version: 2.4.2-1).

    It seems apache and everything functions fine. I tried to run the
    example application from the mod_python site
    (http://www.modpython.org/examples/psp_site.tgz) by decompressing the
    tgz file in a place where apache can find it, and then access it via
    mozilla firefox (simply http://127.0.0.1/psp_site/ where 'psp-site' is
    the name of the directory.)

    However, instead of running the index.py page like it shoud, I just get
    the list of files, as in:

    Index of /psp_site

    Icon Name Last modified Size Description[DIR]
    Parent Directory -
    [TXT] PyFontify.py 15-Feb-2006 23:02 4.3K
    [DIR] images/ 15-Feb-2006 23:02 -
    [TXT] index.py 15-Feb-2006 23:02 3.4K
    [ ] index.pyc 15-Feb-2006 23:02 4.1K
    [TXT] py2html.py 15-Feb-2006 23:02 13K
    [DIR] styles/ 15-Feb-2006 23:02 -
    [DIR] templates/ 15-Feb-2006 23:02 -
    [TXT] view.py 15-Feb-2006 23:02 726


    and clicking any of the .py files just opens the 'open/save' menu. The
    ..htaccess file contains:

    SetHandler mod_python
    PythonHandler mod_python.publ isher
    PythonDebug On

    everything is exactly as it is on "http://www.modpython.o rg/examples/",
    I didn't change anything.

    Anyone has any idea as to what went wrong?

    Thank you in advance,
    Ido Yehieli.

  • Dennis Benzinger

    #2
    Re: apache mod_python problem

    Ido Yehieli schrieb:[color=blue]
    > [...]
    > Anyone has any idea as to what went wrong?
    > [...][/color]

    If you compiled mod_python as a Dynamic Shared Object (DSO) you have to
    tell Apache to load that module. For example like this:

    LoadModule python_module libexec/mod_python.so

    See the mod_python documentation, especially the Configuring Apache section:



    Bye,
    Dennis

    Comment

    • Ido Yehieli

      #3
      Re: apache mod_python problem

      Thank you for your response,
      but I think it's not it - that didn't make any difference.

      Comment

      • grahamd@dscpl.com.au

        #4
        Re: apache mod_python problem


        Ido Yehieli wrote:[color=blue]
        > Thank you for your response,
        > but I think it's not it - that didn't make any difference.[/color]

        Suggest you read:



        It contains helpful hints for getting a basic handler working
        in mod_python. If you can get that working, then try something
        harder.

        You are also better off asking mod_python questions on the
        mod_python mailing list. See www.modpython.org home page
        for how to get on mailing list.

        Graham

        Comment

        • Ido Yehieli

          #5
          Re: apache mod_python problem

          Hi Graham, thank you for that link but it didn't help.
          I've followed the instructions, yet In the 'basic-content-handler'
          section, after getting to the point where it says to add this to the
          main Apache configuration file:

          <Directory /some/directory>
          AllowOverride FileInfo
          </Directory>

          I replaced /some/directory with the correct directory and restarted
          apache2 and stilll get the same response - firwfox asks to save the
          response to a file. Does it matter where in the apache2 configuration
          file I've located these 3 lines? I've just added them at the end, just
          before the last line: </VirtualHost>

          Thank you in advance,
          Ido.

          Comment

          • Ido Yehieli

            #6
            Re: apache mod_python problem

            please ignore that last message, the instructions on that webpage
            worked, it was my fault.

            Thanks,
            Ido.

            Comment

            Working...