473,408 Members | 2,734 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,408 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 1189
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.