[mostly OT] mod_python & doc file system layout

J

Jan Danielsson

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?
 
G

Graham Dumpleton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top