Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 18, 2011 13:22:58

a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

How to plug in Python: CGI


Hello,

On my VPS, I've got Apache running on MS Windows Server 2008 R2. What
is the best way you suggest to plug in Python to be used in a
relatively highly loaded webproject (on Django)? mod_python,
fastCGI?... What are advantages and drawbacks, from your real
experience? I'm new to both Python and Django, so I would appreciate
how-tos as well (particular urls to faqs/docs will do, of course).

Thanks,
Anthony

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 18, 2011 13:52:27

T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

How to plug in Python: CGI


now it is seems to be mod_wsgi

in apache/conf.d/ yoursite.conf

WSGIScriptAlias / /path/to/your/djangoproject/wsgi_handler.py

WSGIDaemonProcess djangoproject user=CCC group=CCC processes=5
threads=1
WSGIProcessGroup djangoproject

and had to write an wsgi_handler in djangoproject root where you have
settings.py like

import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
os.environ = 'Djangoproject.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

things to replace DjangoProject by the name of your project !
/ is your web root
so no other path will work instead you add an alias for apache

Alias /aOtherPath/ /taget/to/a/OtehrPater/

tonton

On Tue, Jan 18, 2011 at 2:22 PM, ashdesigner <antony.shash...@gmail.com>wrote:

> Hello,
>
> On my VPS, I've got Apache running on MS Windows Server 2008 R2. What
> is the best way you suggest to plug in Python to be used in a
> relatively highly loaded webproject (on Django)? mod_python,
> fastCGI?... What are advantages and drawbacks, from your real
> experience? I'm new to both Python and Django, so I would appreciate
> how-tos as well (particular urls to faqs/docs will do, of course).
>
> Thanks,
> Anthony
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 18, 2011 19:42:07

a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

How to plug in Python: CGI


Ok, thank you, will try to handle it))

On Jan 18, 4:52 pm, Tonton <to.ton...@gmail.com> wrote:
> now it is seems to be mod_wsgi
>
> in apache/conf.d/ yoursite.conf
>
>  WSGIScriptAlias / /path/to/your/djangoproject/wsgi_handler.py
>
>        WSGIDaemonProcess djangoproject user=CCC group=CCC processes=5
> threads=1
>        WSGIProcessGroup djangoproject
>
> and had to write an wsgi_handler in djangoproject root where you have
> settings.py like
>
> import sys
> import os
> sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
> os.environ = 'Djangoproject.settings'
>
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> things to replace DjangoProject by the name of your project !
> / is your web root
> so no other path will work instead  you add an alias for apache
>
> Alias /aOtherPath/ /taget/to/a/OtehrPater/
>
> tonton
>
> On Tue, Jan 18, 2011 at 2:22 PM, ashdesigner <antony.shash...@gmail.com>wrote:
>
> > Hello,
>
> > On my VPS, I've got Apache running on MS Windows Server 2008 R2. What
> > is the best way you suggest to plug in Python to be used in a
> > relatively highly loaded webproject (on Django)? mod_python,
> > fastCGI?... What are advantages and drawbacks, from your real
> > experience? I'm new to both Python and Django, so I would appreciate
> > how-tos as well (particular urls to faqs/docs will do, of course).
>
> > Thanks,
> > Anthony
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.> To post to this group, send email
> > todjango-us...@googlegroups.com.
> > To unsubscribe from this group, send email
> > to>django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Jan. 18, 2011 21:24:38

Graham D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

How to plug in Python: CGI


On Wednesday, January 19, 2011 12:52:14 AM UTC+11, tonton wrote:
>
> now it is seems to be mod_wsgi
>
> in apache/conf.d/ yoursite.conf
>
> WSGIScriptAlias / /path/to/your/djangoproject/wsgi_handler.py
>
> WSGIDaemonProcess djangoproject user=CCC group=CCC processes=5
> threads=1
> WSGIProcessGroup djangoproject
>

They are on Windows so they can't use mod_wsgi daemon mode.

The best choice for Python web hosting would be not to use Windows in the
first place. ;-)

Graham


> and had to write an wsgi_handler in djangoproject root where you have
> settings.py like
>
> import sys
> import os
> sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
> os.environ = 'Djangoproject.settings'
>
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> things to replace DjangoProject by the name of your project !
> / is your web root
> so no other path will work instead you add an alias for apache
>
> Alias /aOtherPath/ /taget/to/a/OtehrPater/
>
> tonton
>
> On Tue, Jan 18, 2011 at 2:22 PM, ashdesigner <antony....@gmail.com> wrote:
>
>> Hello,
>>
>> On my VPS, I've got Apache running on MS Windows Server 2008 R2. What
>> is the best way you suggest to plug in Python to be used in a
>> relatively highly loaded webproject (on Django)? mod_python,
>> fastCGI?... What are advantages and drawbacks, from your real
>> experience? I'm new to both Python and Django, so I would appreciate
>> how-tos as well (particular urls to faqs/docs will do, of course).
>>
>> Thanks,
>> Anthony
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users...@googlegroups.com.
>> For more options, visit this group at
>>http://groups.google.com/group/django-users?hl=en.
>>
>>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 Jan. 19, 2011 13:03:07

a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

How to plug in Python: CGI


Graham,

Thanks, but I'm running Windows.

Anthony

On Jan 19, 12:24 am, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:
> On Wednesday, January 19, 2011 12:52:14 AM UTC+11, tonton wrote:
>
> > now it is seems to be mod_wsgi
>
> > in apache/conf.d/ yoursite.conf
>
> >  WSGIScriptAlias / /path/to/your/djangoproject/wsgi_handler.py
>
> >        WSGIDaemonProcess djangoproject user=CCC group=CCC processes=5
> > threads=1
> >        WSGIProcessGroup djangoproject  
>
> They are on Windows so they can't use mod_wsgi daemon mode.
>
> The best choice for Python web hosting would be not to use Windows in the
> first place. ;-)
>
> Graham
>
> > and had to write an wsgi_handler in djangoproject root where you have
> > settings.py like
>
> > import sys
> > import os
> > sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
> > os.environ = 'Djangoproject.settings'
>
> > import django.core.handlers.wsgi
> > application = django.core.handlers.wsgi.WSGIHandler()
>
> > things to replace DjangoProject by the name of your project !
> > / is your web root
> > so no other path will work instead  you add an alias for apache
>
> > Alias /aOtherPath/ /taget/to/a/OtehrPater/
>
> > tonton
>
> > On Tue, Jan 18, 2011 at 2:22 PM, ashdesigner <antony....@gmail.com> wrote:
>
> >> Hello,
>
> >> On my VPS, I've got Apache running on MS Windows Server 2008 R2. What
> >> is the best way you suggest to plug in Python to be used in a
> >> relatively highly loaded webproject (on Django)? mod_python,
> >> fastCGI?... What are advantages and drawbacks, from your real
> >> experience? I'm new to both Python and Django, so I would appreciate
> >> how-tos as well (particular urls to faqs/docs will do, of course).
>
> >> Thanks,
> >> Anthony
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Django users" group.
> >> To post to this group, send email to django...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> django-users...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 Jan. 19, 2011 13:19:17

T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

How to plug in Python: CGI


so nobody is perfect !

is mod_wsgi in apache for windows ?

i think it is like in linux
one virtual host point to your
wsgi_handler.py but with \ instead

look this first google result in wsgi apache django windows search :http://pradyumnajoshi.wordpress.com/2009/06/09/setting-up-mod_wsgi-for-apache-and-django-on-windows/good luck

tonton

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#7 Jan. 19, 2011 14:49:39

a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

How to plug in Python: CGI


Tonton,

Thank you for hint, I will take a look.

Anthony

On Jan 19, 4:19 pm, Tonton <to.ton...@gmail.com> wrote:
> so nobody is perfect !
>
> is mod_wsgi in apache for windows ?
>
> i think it is like in linux
> one virtual host point to your
> wsgi_handler.py but with \ instead
>
> look this first google result in wsgi apache django windows search :
>
>http://pradyumnajoshi.wordpress.com/2009/06/09/setting-up-mod_wsgi-fo...
>
> good luck
>
> tonton

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 21st of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support