Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Apache mod_rewrite and python

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
Python in Apache !? - Hi, I have a little which I would like to run under my Apache. The is The script is the ######## #news.py #..

How to set up Python on Apache 2 for Windows. - I am to set up Python on Apache 2 for Windows so that I can run ViewCVS. ViewCVS works OK using its built-in mini web server and Python works ok on its own, but I cannot set up under Apache 2. The says to..

tomcat and python - Hi, I have a little python programm which should be executed within the cgi of tomcat (5.0.27). But every time I try to execute this programm I get the following exception (although I already have tried to start tomcat with more memory): ..

PYTHON and PHP Errors - I have observed the following messages in my apache2 error_log on Fedora 3 after an update: ERROR_LOG [Wed Feb 16 18:08:08 2005] [notice] caught SIGTERM, shutting down Could not find platform

fastcgi and python - I am wondering if anyone is using with python. I have a fastcgi python module and would like to see some examples of how it is used. All the examples on the fastcgi web site are c or perl code examples. tia
Next:  Apache: Invalid method in request x80x8cx01x03x01  
Author Message
Danilo

External


Since: Mar 08, 2007
Posts: 1



(Msg. 1) Posted: Thu Mar 08, 2007 9:37 am
Post subject: Apache mod_rewrite and python
Archived from groups: alt>apache>configuration (more info?)

Hi there,
is it possible to create a rewrite rule to send every server-request
to the directory /py? But only if the file does not exists on the
server.

This is my .conf:

<VirtualHost *>
DocumentRoot /var/www/mydomain.com/htdocs
ServerName mydomain.com
ServerAlias www.mydomain.com

<Location "/py">
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonPath "['/var/www/mydomain.com/htdocs/py'] +
sys.path"
SetEnv DJANGO_SETTINGS_MODULE myapp.settings
PythonDebug Off
</Location>

RewriteEngine On
# If its not here...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Look here instead...
RewriteRule (.*) /py$1 [PT]

ErrorLog /var/www/mydomain.com/logs/error.log
CustomLog /var/www/mydomain.com/logs/access.log common
</VirtualHost>

But with that every request is send to /py. Any ideas what could be
wrong?

 >> Stay informed about: Apache mod_rewrite and python 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Thu Mar 08, 2007 6:52 pm
Post subject: Re: Apache mod_rewrite and python [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived

 >> Stay informed about: Apache mod_rewrite and python 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]