473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help required with mod_python and apache virtual hosts

Hi,

I'm trying to get mod_python working on my web server, but I'm running
into problems, possibly due to having virtual hosts configured.

I'm no apache guru (newbie is more accurate!) so I could easily be doing
something wrong. The apache configuration is further complicated by
having an include file for each virtual host, so the config isn't
actually *in* the main apache conf file!

I've read through several tutorials, but they all seem to deal with a
much simpler setup than I have. I *could* throw away the current config
and start again, but I'd inevitably break more than I fixed!

So, are there any mod_python experts out there willing to put up with
some daft questions?

I live in hope ;-)
-andyj

Jul 18 '05 #1
3 2008
andy <an**@wild-flower.co.uk> writes:
I'm trying to get mod_python working on my web server, but I'm running
into problems, possibly due to having virtual hosts configured.


What problems are you having? What are you expecting to happen,
and what is actually happening? If there are warning or error
messages, what are they? What makes you think the problems might
be related to virtual hosts?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
Jul 18 '05 #2
On Fri, 2004-10-01 at 03:53, Michael Fuhr wrote:
andy <an**@wild-flower.co.uk> writes:
I'm trying to get mod_python working on my web server, but I'm running
into problems, possibly due to having virtual hosts configured.


What problems are you having? What are you expecting to happen,
and what is actually happening? If there are warning or error
messages, what are they? What makes you think the problems might
be related to virtual hosts?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/


Thanks for replying, Michael.

Is it too simplistic to just say "it doesn't work" ? As I said, Apache
is not one of my areas of expertise (yet!). I have tried to configure
it according to the pycon 2004 "Introduction to mod_python" paper's
examples, but as the httpd.conf file is arranged as a common part and
then "includes" config files for each virtual host, I'm not sure I've
done it right. First, I tried to configure it so I can put the python
scripts anywhere in the web-servers httpdoc tree, but that didn't work,
so I have now tried customising one of the include files, but that
doesn't work either. This configuration scheme is dictated by my
hosting company, and whereas I *could* change it, I'd lose all hope of
support should I need it ;-) and the automated admin tool might stop
working, too. I can get away with altering parts of it, but not a
wholesale re-write (not that I'm capable of this anyway).

Here's the error I get in the browser:

"""
Object not found!

The requested URL was not found on this server. If you entered the URL
manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster

Error 404

www.fusionation.org
Thu 30 Sep 2004 11:03:23 PM BST
Apache/2.0.40 (Red Hat Linux)
"""

The file in question *is* available, and readable by Apache (I've proven
this by simply renaming it with .html on the end - as expected, the
browser just shows the python source).

I can't think of what else to check.

Hope that gives you something to go on...

regards,
-andyj

Jul 18 '05 #3
andy <an**@wild-flower.co.uk> writes:
On Fri, 2004-10-01 at 03:53, Michael Fuhr wrote:
andy <an**@wild-flower.co.uk> writes:
I'm trying to get mod_python working on my web server, but I'm running
into problems, possibly due to having virtual hosts configured.
What problems are you having? What are you expecting to happen,
and what is actually happening? If there are warning or error
messages, what are they? What makes you think the problems might
be related to virtual hosts?


Is it too simplistic to just say "it doesn't work" ?


Yes -- saying "it doesn't work" tells us nothing about what you've
done and what symptoms you're seeing. Without more information we
have to guess and make assumptions, which can waste time by leading
us down the wrong path.

Here's a good article on how to ask questions:

http://www.catb.org/~esr/faqs/smart-questions.html

"It is the questions asked, not the answers given, that distinguish
the wise person from the fool." -Elie Wiesel
As I said, Apache is not one of my areas of expertise (yet!). I
have tried to configure it according to the pycon 2004 "Introduction
to mod_python" paper's examples, but as the httpd.conf file is
arranged as a common part and then "includes" config files for each
virtual host, I'm not sure I've done it right. First, I tried to
configure it so I can put the python scripts anywhere in the
web-servers httpdoc tree, but that didn't work, so I have now tried
customising one of the include files, but that doesn't work either.
What configuration directives did you use and where did you put
them? If the directives are inside a block such as <VirtualHost>
or <Directory>, then post the entire block.
This configuration scheme is dictated by my hosting company, and
whereas I *could* change it, I'd lose all hope of support should I
need it ;-) and the automated admin tool might stop working, too.
I can get away with altering parts of it, but not a wholesale
re-write (not that I'm capable of this anyway).
Tell us what you're altering from the working configuration.

Have you brought this issue up with the hosting company? If they're
not able to help then perhaps you should find another provider, one
with more technical expertise.
Here's the error I get in the browser:

"""
Object not found!
Do you have access to the web server's error logs? That's where
you're more likely to see meaningful diagnostics.
The file in question *is* available, and readable by Apache (I've proven
this by simply renaming it with .html on the end - as expected, the
browser just shows the python source).


That's one problem we can rule out (the kind of problem that we'd
have had to ask about if you hadn't told us). What name does the
file usually have, the name that results in "Object not found"?
What, if anything, appears in the web server's error logs when you
request that object? Can you run the python script successfully
from the command line on the web server?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Alexandr Molochnikov | last post by:
Hello, I've spent a few days trying to get Apache and Tomcat work together via JK module. First I followed the following HOWTO link: http://www.johnturner.com/howto/winxp-howto.html and...
40
by: Shufen | last post by:
Hi all, Can someone who has use PHP before and know quite well about the language, tell me what are the stuffs that Python offers and PHP doesn't. A few examples will be nice. I know about the...
2
by: Arso - Italy | last post by:
Hi someone have already used eric3 for debugging code running on apache using mod_python ? After the execution of the patch for apache.py, how the debug is activated ? More thanks for any...
2
by: ws Wang | last post by:
MySQLdb is working fine at command line, however when I tried to use it with mod_python, it give me a "server not initialized" error. This is working fine: ----------------------- testmy.py...
6
by: Anthony L. | last post by:
I am writing a web application that is comparable to a content management system used in blogging. I really want to use Python after having done some evaluation coding using Python 2.3.5 with...
7
by: Bob | last post by:
I'm using PHP 5.1.1 with Apache 2.0.54 and several virtual hosts. PHP is installed as a module. I've created a very simple test page containing <?php phpinfo(); ?> and placed it at the doc root...
1
by: treelife | last post by:
I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python import apache def handler(req):...
3
by: Michael | last post by:
Hey everyone, Is it possible to automatically insert headers/footers using mod_python? I will be not be using PSP's, so I cannot use the PSP/include solution. Furthermore, the header will be...
1
by: Jan Danielsson | last post by:
Hello all, This is probably more of an apache question, but I'm guessing there will be other mod_python-beginners who are wondering the same thing. Let's say I have a web app called MyApp....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.