473,238 Members | 1,851 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,238 software developers and data experts.

[mostly OT] mod_python & doc file system layout

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. It uses the usual images and
style sheets. I keep it all in
~/projects/MyApp/{styles,images,index.py,.htaccess}. I configure up
apache to use virtual hosts, and point it to MyApp.

Now when I access myapp.local (which points to 127.0.0.1, obviously),
my index.py is parsed properly. However, any access made to /images or
/styles end up being handled by mod_python, which isn't good, because it
won't load images or style sheets.

I have solved this by moving index.py (and the associated .htaccess)
to a subdirectory "main".

I guess one solution would be to make an access to / on the virtual
server redirect to main.

Another solution, I guess, would be to make the python script load
the images and style sheets.. A solution which I find to be particularly
ugly. :-)

Any mod_python users out there with any other solutions?

--
Kind regards,
Jan Danielsson
Jul 4 '07 #1
1 1182
On Jul 5, 12:22 am, Jan Danielsson <jan.m.daniels...@gmail.comwrote:
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. It uses the usual images and
style sheets. I keep it all in
~/projects/MyApp/{styles,images,index.py,.htaccess}. I configure up
apache to use virtual hosts, and point it to MyApp.

Now when I access myapp.local (which points to 127.0.0.1, obviously),
my index.py is parsed properly. However, any access made to /images or
/styles end up being handled by mod_python, which isn't good, because it
won't load images or style sheets.

I have solved this by moving index.py (and the associated .htaccess)
to a subdirectory "main".

I guess one solution would be to make an access to / on the virtual
server redirect to main.

Another solution, I guess, would be to make the python script load
the images and style sheets.. A solution which I find to be particularly
ugly. :-)

Any mod_python users out there with any other solutions?
In the subdirectories containing your static files add a .htaccess
file containing:

SetHandler None

Graham

Jul 5 '07 #2

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

Similar topics

1
by: wolf | last post by:
i would like to briefly share my experiences with installing mod_python on a w2000 box. i must say that i believe the installation process to be unnecessarily complicated by the simple fact that...
6
by: Piet | last post by:
Hi there, I cannot install mod_python v3.1.3 on either Win2k/ActivePython 2.3.2 or WinMe/Python 2.3.4. When I run the Windows installer, I get the following error message: Traceback (most recent...
0
by: Python_it | last post by:
I'm going to work with mod_python. I install mod_python 3.2.2b for python 2.4. If i test my install with mptest.py see this link:...
2
by: exhuma.twn | last post by:
Hi again, as soon as I try to make use of the "session" object inside a psp-template file, I get the following error: Mod_python error: "PythonHandler mod_python.publisher" Traceback (most...
1
by: Tama | last post by:
Hello, I've didn't find any answer to my problem so I start a new topic. I have installed Apache 1.3.33 on Windows XP. I've also downloaded and installed ActivePython form...
1
by: boney | last post by:
hello All, I am totally unknown to python language.. i need to install mod_python to embed python interpreter with the Apache server, in order to use Trac with Apache Web Server i am using...
5
by: m.banaouas | last post by:
Hi, bonjour, witch versions are suitable to use for apache & mod_python ? Can i install and use "Apache 2.2.3" & "mod_python 3.2.10" (most recent versions) without facing any known major...
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...
4
by: Lad | last post by:
In my web application I use Apache and mod_python. I allow users to upload huge files( via HTTP FORM , using POST method) I would like to store the file directly on a hard disk and not to upload...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.