Newbie Question
Joel Eusebio
joele at qalabs.com
Wed Feb 2 11:58:08 EST 2005
Hi Jeremy & Robey
Acces_log:
172.16.38.6 - - [01/Feb/2005:17:36:14 -0800] "GET /test.py HTTP/1.1" 404 276
"-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)"
172.16.38.6 - - [01/Feb/2005:17:41:44 -0800] "GET /test/mptest.py/formLogin
HTTP/1.1" 404 293 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2;
.NET CLR 1.1.4322)"
Error_log:
[Wed Feb 02 08:55:18 2005] [notice] mod_python: (Re)importing module
'mod_python.publisher'
[Wed Feb 02 08:55:18 2005] [notice] mod_python: (Re)importing module 'test'
with path set to '['/var/www/html']'
Httpd.conf:
LoadModule python_module modules/mod_python.so
#
Order allow,deny
Allow from all
AddHandler mod_python .py
Options Indexes Includes FollowSymlinks Multiviews
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
<Directory /var/www/html/test>
AddHandler mod_python .py
AllowOverride None
PythonHandler mod_python.publisher
PythonDebug On
Thanks again,
Joel
-----Original Message-----
From: python-list-bounces+joele=qalabs.com at python.org
[mailto:python-list-bounces+joele=qalabs.com at python.org] On Behalf Of Jeremy
Bowers
Sent: Tuesday, February 01, 2005 5:47 PM
To: python-list at python.org
Subject: Re: Newbie Question
On Tue, 01 Feb 2005 17:47:39 -0800, Joel Eusebio wrote:
> Whenever I access test.py from my browser it says "The page cannot be
> found" , I have the file on /var/www/html, what did I miss?
>
> Thanks in advance,
> Joel
In general, you will need to post the relevant entries from your Apache
error log and access log. A lot of things can go wrong between your Python
script and final output.
However, if you're getting a 404, it means that you haven't associated the
URL to the file correctly. Again, a lot of things can prevent this, so
you're also going to need to post the relevant Apache configuration files.
Without that, I can't be any more specific.
I'm also concerned that you are conflating mod_python with Python CGI,
which work completely differently when it comes to associating code to
URLs. In general, you won't access a mod_python script by typing in a
URL to a file; that will either try to run it as a CGI or just display it
(depending on the configuration). But we'll work on this when you post the
necessary information and we can see what you are trying to do.
--
http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list