[mostly OT] mod_python & doc file system layout

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jan Danielsson

    #1

    [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,.htacc ess}. 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
  • Graham Dumpleton

    #2
    Re: mod_python & doc file system layout

    On Jul 5, 12:22 am, Jan Danielsson <jan.m.daniels. ..@gmail.comwro te:
    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,.htacc ess}. 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

    Comment

    Working...