> how can I host a few single files at root level, like for example a
> crossdomain.xml file. Using Apache2 + mod_python.
>
> ( http://www.moock.org/asdg/technotes/crossDomainPolicyFiles/ )
>
> thx for any hints,
Here's what I'm doing. My (django pertinent part of) apache configuration
looks like this:
<VirtualHost *:80>
DocumentRoot "/usr/people/example/www"
ServerName www.example.com
ServerAlias example.com *.example.com
ServerAlias example.net *.example.net
CustomLog /var/log/apache/example/access_log combined
ErrorLog /var/log/apache/example/error_log
# other, static media
<Location "/">
SetHandler mod_python
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE example.settings
PythonPath "sys.path+['/usr/people/example']"
PythonDebug On
PythonAutoReload On
</Location>
# django admin interface media
<Location "/media">
SetHandler None
</Location>
# apache directory icons, etc.
<Location "/icons">
SetHandler None
</Location>
<Location "/images">
SetHandler None
</Location>
<Location "/static">
SetHandler None
</Location>
<Location "/docs">
SetHandler None
</Location>
<Directory /usr/people/example/www>
Options -Indexes FollowSymLinks
</Directory>
</VirtualHost>
This allows serving regular files from /media, /icons, /images, /static
and /docs
You could also use a LocationMatch directive for *.xml. For serving the
main index.html, I use the flat pages middleware.
--
Mike Cuddy ([EMAIL PROTECTED]), Programmer, Baritone, Daddy, Human.
Fen's Ende Software, Redwood City, CA, USA, Earth, Sol System, Milky Way.
"The problem with defending the purity of the English language is
that English is about as pure as a cribhouse whore. We don't just
borrow words; on occasion, English has pursued other languages down
alleyways to beat them unconscious and rifle their pockets for new
vocabulary." -- James D. Nicoll
Join CAUCE: The Coalition Against Unsolicited Commercial E-mail.
<http://www.cauce.org/>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---