0

I don't know why python isn't working with apache in ubuntu.

I've got python and libapache2-mod-python installed.

My default config file:

Options Indexes FollowSymLinks MultiViews
AlowOverride None
Order allow,deny
Allow from all

# Python
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On

My Error log is empty.

I've got python module enabled.

A simple python file:

def index(req):
    return "TEST";

But when accessing from webserver it has no response.

Somebody can help me?

1 Answers1

0

You have defined a function, that's good! Now, just call it. Like this:

def index():
    return "TEST"

index()

(Note that unlike C, you do not need ; at the end of statements in python)

DevShark
  • 8,558
  • 9
  • 32
  • 56