Hi Ramon,
As far as I understood the apache jakarta docs, the problem you
describe might be caused by using sethandlers.
Therefore, if you have time for further experiments, you might want to
do either
- set up another virtual host for the static files
(e.g.,media.mysite.com) and avoid using SetHandler None
or
- Instead of invoking Jkmount, do something like this
<Location "/"> #or <Location "/*"> - I am not sure which one is
correct
SetHandler jakarta-servlet
SetEnv JK_WORKER_NAME mysite-worker
</Location>
<Location "/media">
SetHandler none
</Location>
<Location "/media.mysite.com">
SetHandler none
</Location>
Hope that helps.
Greetings,
Giorgi
P.S. I believe using http://www.saddi.com/software/ajp-wsgi/ instead
of flup-ajp leads to an improvement in performance.
On 13 Dez., 16:30, Roman Zechner <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I want to use django with AJP. Inspired
> byhttp://blog.webpragmatix.info/category/python-programming-language/dj...
> andhttp://john.calixto.net/django_benchmarks.htmland the thought of
> having two completely separated systems that can run under different
> uid's made me courious.
>
> Problem: I get HTTP 500 errors.
>
> What I use:
>
> + debian (on a virtual server if that matters)
> + apache2
> + mod_jk
> + django-trunk (fresh and tasty from svn)
> + flup
> + mysql
>
> What I did:
>
> 1. I set up apache2.conf like this
>
> <VirtualHost *:80>
> ServerNamewww.mysite.com
> ServerAlias mysite.com
> DocumentRoot /var/www/mysite.com
>
> # Possible values include: debug, info, notice, warn, error,
> crit, alert, emerg.
> LogLevel warn
> CustomLog /var/log/apache2/mysite.com_access.log combined
> ErrorLog /var/log/apache2/mysite.com_error.log
>
> JkMount /* mysite-worker
>
> #
> # Theme files are static and not done by django
> #
> <Location "/media">
> SetHandler none
> </Location>
>
> <Location "/media.mysite.com">
> SetHandler none
> </Location>
>
> </VirtualHost>
>
> 2. included jk.conf
> # The list of Tomcat workers
> #
> worker.list=mysite-worker
>
> worker.mysite-worker.port=8666
> worker.mysite-worker.host=localhost
> worker.mysite-worker.type=ajp13
> #
> # Specify the size of the open connection cache.
> worker.mysite-worker.cachesize=10
> #
> # Specifies the load balance factor when used with
> # a load balancing worker.
> # Note:
> # ----> lbfactor must be > 0
> # ----> Low lbfactor means less work done by the worker.
> #worker.mysite-worker.lbfactor=1
>
> 3. started django using ajp
>
> [EMAIL PROTECTED]:# cd /usr/local/django-apps/mysite/
> [EMAIL PROTECTED]:# sudo -u www-data ./manage.py runfcgi protocol=ajp
> method=threaded host=127.0.0.1 port=8666 --settings=mysite.settings
>
> What am I doing wrong here?
>
> In the beginning I thought this would be some user access problem
> where apache2 can't connect to django, but using `sudo` it can't be
> that.
> mod_jk is working with tomcat. I also checked several log files, but
> couldn't find any information except in the acces-log of apache2.
>
> There seem to be pretty few people around using django with ajp, but
> never give up hope :-)
>
> If anybody of the django-documenteers read this, maybe you want to add
> examples tohttp://www.djangoproject.com/documentation/fastcgi/on how
> to use django with AJP. You should also hint that you have to include
> the settings file with --settings=mysite.settings. And if I may add,
> the django docs are really great - I never felt so comfortably to
> browse a doc, very thoughtful implemented.
>
> Looking forward for your answers - you other 2 AJP users out there.
>
> Cheers, Roman
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---