Google Groups Home
Help | Sign in
I need instructions in best way to use django under IIS shared hosting (Python is installed)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  21 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mamcxyz@gmail.com  
View profile  
 More options May 23 2006, 6:08 pm
From: "mamc...@gmail.com" <mamc...@gmail.com>
Date: Tue, 23 May 2006 22:08:04 -0000
Local: Tues, May 23 2006 6:08 pm
Subject: I need instructions in best way to use django under IIS shared hosting (Python is installed)
Hi,

Because I'm a lucky man, i'm convinced to my hosting provider to setup
python so I can play with django ;)

I have a reseller account, so I plan to reuse my first django website
(a portal of colombian food)

But, this guys are asking how setup the thing. Rigth now, this guys are
already installed python

I know this:

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B276494

But is a instruction from MS... so how can be good (no! is not becuase
is from MS: serving CGI this way is bad performance!)

I want to provide a good advice: My parent hosting company is given to
me a *great* favor so I don't wanna put the support staff in
troubles... This is for run in a shared hosting environemnt so must be
bullet proof.

Because that, I think is impossible to demand a apache config here.

So, what are the alternatives? (excluding getting a linux box)

- Is FastCGI the rigth answer?
- Existe a stable ISAPI dll?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Dunck  
View profile  
 More options May 23 2006, 6:11 pm
From: "Jeremy Dunck" <jdu...@gmail.com>
Date: Tue, 23 May 2006 17:11:50 -0500
Local: Tues, May 23 2006 6:11 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
On 5/23/06, mamc...@gmail.com <mamc...@gmail.com> wrote:

> So, what are the alternatives? (excluding getting a linux box)

> - Is FastCGI the rigth answer?
> - Existe a stable ISAPI dll?

You've set up some very odd and difficult requirements.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Holsman  
View profile  
 More options May 23 2006, 6:25 pm
From: Ian Holsman <kry...@gmail.com>
Date: Wed, 24 May 2006 08:25:47 +1000
Local: Tues, May 23 2006 6:25 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

On 24/05/2006, at 8:08 AM, mamc...@gmail.com wrote:

> re.

> So, what are the alternatives? (excluding getting a linux box)

you can run apache2.2 on windows quite well.
if IIS has a proxy type solution you could just run apache2.2 on a  
separate port and have it handle the django side of things.
otherwise you could have apache become the front-end webserver and  
then delegate the requests which require ISS to the proxy.
something like in apache

namevirtualhost *

<virtualhost *>
servername i-need-iis
proxypass / http://127.0.0.1:3000/
proxypassreverse / http://127.0.0.1:3000/
</virtualhost>
where IIS would run on port 3000.

regards


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mamcxyz@gmail.com  
View profile  
 More options May 23 2006, 6:35 pm
From: "mamc...@gmail.com" <mamc...@gmail.com>
Date: Tue, 23 May 2006 22:35:23 -0000
Local: Tues, May 23 2006 6:35 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
I have high expectations from the python crew ;)

So, after all, not was windows the easy and linux the ugly!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mamcxyz@gmail.com  
View profile  
 More options May 23 2006, 6:38 pm
From: "mamc...@gmail.com" <mamc...@gmail.com>
Date: Tue, 23 May 2006 22:38:10 -0000
Local: Tues, May 23 2006 6:38 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
I don't think the last option (swap the IIS for Apache) like to the
hosting company. Remember: is a shared hosting server, already RUNNING
websites and that thing (the test part is my job, but if that pass ok
this must be a simply thing for theirs)...

The first option... that not mean that a URL become:

www.mysite:3000/index?

Is fine for development or in-house websites but I'm planing run
comercial websites...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Holsman  
View profile  
 More options May 23 2006, 6:44 pm
From: Ian Holsman <kry...@gmail.com>
Date: Wed, 24 May 2006 08:44:39 +1000
Local: Tues, May 23 2006 6:44 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
your not understanding reverse proxying.
the ':3000' is not visible to the outside.

IIS would need to forward the request to the port and then push the  
response back to you

something like this http://www.saltypickle.com/Home/16 is what I am  
talking about

On 24/05/2006, at 8:38 AM, mamc...@gmail.com wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
iGL  
View profile  
 More options May 23 2006, 9:22 pm
From: "iGL" <Giorgi.Lekishv...@gmail.com>
Date: Wed, 24 May 2006 01:22:08 -0000
Local: Tues, May 23 2006 9:22 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
Hi,
I guess the right way to run a Django app on IIS is to use ISAPI-WSGI
module. However, I haven't tested it much and, definitely, never did so
in a production mode...
Anyway, hope the following helps:
Since Py2.4, ISAPI dll is part of activepython2.4
(http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/pywin32/html/i...
); also, it's (ISAPI) a part of Mark Hemmond's win32 extensions (
http://sourceforge.net/project/showfiles.php?group_id=78018 ).
There seem to be some other PyISAPIs: http://pyisapie.sourceforge.net/
Anyway, once you ensure that PyISAPI is running correctly, visit
isapi-wsgi extensions page: http://isapi-wsgi.python-hosting.com/ and
run Django as another wsgi app.

greetings,
Giorgi


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mamcxyz@gmail.com  
View profile  
 More options May 24 2006, 1:15 pm
From: "mamc...@gmail.com" <mamc...@gmail.com>
Date: Wed, 24 May 2006 17:15:03 -0000
Local: Wed, May 24 2006 1:15 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
I read anything I get in google about IIS/FastCGI/Django
deployment/WSGI and that stuff..

And I think is very confusing. Is not starnge then people fear to test
python for web hosting: is far more dificult that any other web-enable
language in the deploy side of the things...

I read the ActiveState site: Don't say anything.

The PyISAPI project not have anything about how configure the thing

The only thing I can figure is (for FastCGI)

http://rubyforiis.sosukodo.org/rubyforiis/documentation/installationi...

About install ruby on IIS.. have some sense, but only have in return
blank pages...

I check the WSGI support and maybe I can figure something but the
requeriment to build a .asp page for EACH Url is insane... and the
thing about replicate the url rewriting is not fun...

I only found people that say was able to use IIS with fastcgi or that
say WSGI is the way for python but nothing concrete yet...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Dunck  
View profile  
 More options May 24 2006, 2:04 pm
From: "Jeremy Dunck" <jdu...@gmail.com>
Date: Wed, 24 May 2006 13:04:32 -0500
Local: Wed, May 24 2006 2:04 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
On 5/24/06, mamc...@gmail.com <mamc...@gmail.com> wrote:

> And I think is very confusing. Is not starnge then people fear to test
> python for web hosting: is far more dificult that any other web-enable
> language in the deploy side of the things...

In your own self-interest: you've said you plan to run commercial
sites on this platform.  You have a well-known scaleable and
community-supported configuration (apache+mod_python) on the one hand,
and an alpha- or beta-quality IIS shoehorn on the other hand.  Is
hosting such a significant cost that you couldn't switch to a better
configuration?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mamcxyz@gmail.com  
View profile  
 More options May 24 2006, 3:18 pm
From: "mamc...@gmail.com" <mamc...@gmail.com>
Date: Wed, 24 May 2006 19:18:06 -0000
Local: Wed, May 24 2006 3:18 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
I know...

I have the option to get Linux as a fallback.

The reason? I have everything now under this package, the databases,
the sites, the expertise. I have almost zero experience in run linux
and configure this...

Anyway, despite the fact if I go to Linux or not, I think that persue
the option of easy to run under IIS can help python/django in the
exposure side of the things...

Take in account that if something is under IIS is because run also
ASP/ASP.NET and have some investiment here...

Add another web server is hard to sell...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brett Parker  
View profile  
 More options May 25 2006, 3:26 am
From: Brett Parker <iDu...@sommitrealweird.co.uk>
Date: Thu, 25 May 2006 08:26:56 +0100
Local: Thurs, May 25 2006 3:26 am
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

On Wed, May 24, 2006 at 07:18:06PM -0000, mamc...@gmail.com <mamc...@gmail.com> wrote:

> I know...

> I have the option to get Linux as a fallback.

Shouldn't ever be a fallback, it should be the primary choice - unless
you're fond of having your webserver compromised... (speaking from
experience of setting up IIS and within 3 minutes of it being on the net
with the latest updates it being backdoored and viruses roaming free...)

> The reason? I have everything now under this package, the databases,
> the sites, the expertise. I have almost zero experience in run linux
> and configure this...

All eggs, one basket? Sounds like a good way to run a business there.

> Anyway, despite the fact if I go to Linux or not, I think that persue
> the option of easy to run under IIS can help python/django in the
> exposure side of the things...

Not at the expense of doing more useful things, like finishing off for
the 1.0 release!

> Take in account that if something is under IIS is because run also
> ASP/ASP.NET and have some investiment here...

Or because the space is going cheap because no one else wants to touch
it with a barge pole...

> Add another web server is hard to sell...

Really? I've not noticed that, but the I'm a single user and have 3 web
servers in different places.

Thanks,
Brett.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DavidA  
View profile  
 More options May 25 2006, 4:59 pm
From: "DavidA" <david.avraami...@gmail.com>
Date: Thu, 25 May 2006 20:59:04 -0000
Local: Thurs, May 25 2006 4:59 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
I've used Python with IIS for the MoinMoin wiki (where do they get
these names?). They have a good doc on configuring IIS for Python:
http://moinmoin.wikiwikiweb.de/HelpOnInstalling/InternetInformationSe...

I've done it. It works fine. And then I woke up and installed Apache
and turned off the IIS service.

Note that if you are stuck on Windows, Apache + mod_python + MySQL +
Django works very well. I run that at work and do a lot of my personal
Django development on that and then just "svn up" and "service httpd
restart" on my Linux box to roll out changes.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Dunck  
View profile  
 More options May 25 2006, 5:15 pm
From: "Jeremy Dunck" <jdu...@gmail.com>
Date: Thu, 25 May 2006 16:15:24 -0500
Local: Thurs, May 25 2006 5:15 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
On 5/25/06, DavidA <david.avraami...@gmail.com> wrote:

> I've used Python with IIS for the MoinMoin wiki (where do they get
> these names?).

They speak German.

> Note that if you are stuck on Windows, Apache + mod_python + MySQL +
> Django works very well.

Doesn't pre-forking apache on windows scale badly due to window's high
process startup cost?  I guess it'd depend how often you recycle your
httpd processes...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Holsman  
View profile  
 More options May 25 2006, 5:17 pm
From: Ian Holsman <kry...@gmail.com>
Date: Fri, 26 May 2006 07:17:35 +1000
Local: Thurs, May 25 2006 5:17 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

On 26/05/2006, at 7:15 AM, Jeremy Dunck wrote:

>> Note that if you are stuck on Windows, Apache + mod_python + MySQL +
>> Django works very well.

> Doesn't pre-forking apache on windows scale badly due to window's high
> process startup cost?  I guess it'd depend how often you recycle your
> httpd processes...

Apache2 hasn't pre-forked on windows for years, it uses threads  
inside a single process,
and is about as fast (or faster.. it was close) as the version  
running on linux last time I checked.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DavidA  
View profile  
 More options May 25 2006, 5:25 pm
From: "DavidA" <david.avraami...@gmail.com>
Date: Thu, 25 May 2006 21:25:24 -0000
Local: Thurs, May 25 2006 5:25 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
I should have clarified: I use Apache2 on Windows (and Linux for that
matter). As Ian pointed out, Apache2 is multi-threaded and works very
well on both Linux and Windows.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mamcxyz@gmail.com  
View profile  
 More options May 25 2006, 6:26 pm
From: "mamc...@gmail.com" <mamc...@gmail.com>
Date: Thu, 25 May 2006 22:26:05 -0000
Local: Thurs, May 25 2006 6:26 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
> Speaking from

experience of setting up IIS and within 3 minutes of it being on the
net
with the latest updates it being backdoored and viruses roaming free

That is YOUR experience. My web server never have that kind of
troubles. I have my small developer company with Windows 2003 and I
expose my svn, and other 3/4 internal websites. I don't have problems
with viruses or hacking and run well all this time.

I know that windows by default can be more insecure. But that is not my
experience and that is not the point. The point is: Is possible run
well django/python under IIS, yes or not?

> All eggs, one basket? Sounds like a good way to run a business there.

The other option is try another basket I DON'T KNOW and lets see.

I don't know why the rude acctitude... I'm a former Windows Developer
for 7 years and found a compelling reason to try python and put it for
my company. I'm risking because a)My experience in python is 1 month
2)My experience in django is 2 weeks?

I'm triying to lowe the risk. And if is not possible, I'm willing to
try linux...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mamcxyz@gmail.com  
View profile  
 More options May 25 2006, 6:28 pm
From: "mamc...@gmail.com" <mamc...@gmail.com>
Date: Thu, 25 May 2006 22:28:38 -0000
Local: Thurs, May 25 2006 6:28 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
Ok. So if work, what reason you have for ditch it for Apache?

For this hosting setup, I don't have problems in the security or
performance arena... but maybe because is the main plataform for
python/django?

I'm more worry about crash or glacial performance.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DavidA  
View profile  
 More options May 25 2006, 10:43 pm
From: "DavidA" <david.avraami...@gmail.com>
Date: Fri, 26 May 2006 02:43:25 -0000
Local: Thurs, May 25 2006 10:43 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

> Ok. So if work, what reason you have for ditch it for Apache?

There were really four reasons I moved from IIS to Apache:
1) Virtual hosting: although you _can_ do virtual hosting on IIS, you
really need IIS6 on Win2k3 to support the host header fields. The
default IIS on XP Pro doesn't allow this and I wanted my dev and prod
environments to behave the same way. Apache's virtual hosting support
is a head and shoulders above IIS, in my opinion.
2) Performance: while I don't have specific numbers at hand, the IIS
configuration (of Django and the MoinMoin wiki) always felt a little
sluggish for what should have been snappy apps. I tried them out under
Apache2 and they felt much more responsive. I can't really say if I was
using IIS in the best way, but I did the quick-and-dirty setup in both
IIS and Apache2 and Apache seemed faster. I especially notice this when
I haven't accessed a page in a while. It seems that IIS takes a while
to "warm up" but once it does its not bad. Apache seems to always be
pretty fast.
3) Consistency: I like that my configuration on Windows and Linux is
very similar now. And I've even been thinking of buying a Mac so that
becomes even more important.
4) Community/documentation: once I decided to start using Python, MySQL
and now Django, I find it a lot easier to find information on the web
for using Apache with those technologies. Its sort of the "go with the
grain" mentality. I didn't want to run into the very kinds of problems
you are now - where its hard to find good examples of how to use the
various technologies you have chosen.

I used to be a C#/ASP.NET guy so I have used IIS quite a bit. Its not
bad, and I haven't had the problems with security that other note - at
least not in any of the more recent versions of Windows and IIS. But I
just find for the development platform I've chose, Apache is a better
fit than IIS. That's all.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mamcxyz@gmail.com  
View profile  
 More options May 26 2006, 3:10 pm
From: "mamc...@gmail.com" <mamc...@gmail.com>
Date: Fri, 26 May 2006 19:10:02 -0000
Local: Fri, May 26 2006 3:10 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
Ok, fair points.

I think that using python in a pure CGI setup is responsible in part of
the lack of performance here.

Because that, I'm looking how use fastcgi and/or wsgi here. Also, I
don't see how the common setup of map .py extension for cgi can help
with django (how can execure django/home? how load the settings?)

I have FastCGI installed under IIS... I have a couple of WSGI solutions
too., but I don't figure how can use that...

:(


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mamcxyz@gmail.com  
View profile  
 More options May 26 2006, 6:49 pm
From: "mamc...@gmail.com" <mamc...@gmail.com>
Date: Fri, 26 May 2006 22:49:06 -0000
Local: Fri, May 26 2006 6:49 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
Ok, I'm in something now...

I look to the rails guys how install ruby on rails under IIS.

I get this:

http://made-of-stone.blogspot.com/2006/01/rails-on-iis-revisited.html

And with

http://urlrewriter.net/index.php/using/installation/windows-server-2003

I was able to get close...

I install FastCGI for windows and configure the fcgi file this way:

from flup.server.fcgi_fork import WSGIServer
#from flup.server.fcgi import WSGIServer
from flup.middleware.gzip import GzipMiddleware

from django.core.handlers.wsgi import WSGIHandler

sys.path.insert(0, 'E:\\Proyectos\\Python\\jhonWeb\\')
os.environ['DJANGO_SETTINGS_MODULE'] = 'jhonWeb.settings'

handler = WSGIHandler()
handler = GzipMiddleware(handler)
WSGIServer(handler).run()

I try to the default way in django site

I setup the urlrewrite like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
        <configSections>
                <section name="rewriter"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionH andler,
Intelligencia.UrlRewriter" />
        </configSections>
        <rewriter>
                <if url="^(/[^.]+)$" rewrite="jhonWeb.fcgi?$1" />
        </rewriter>
        <system.web>
                <httpModules>
                        <add
type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewrite r"
                                name="UrlRewriter" />
                </httpModules>
        </system.web>
</configuration>

And I get:

The virtual path '/jhonWeb.fcgi' maps to another application, which is
not allowed

I allow the fastcgi.dll for .fcgi files and configure the registry. I
follow the steps of the ruby on rails info I point before.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Phillip Sitbon  
View profile  
 More options Jun 16 2006, 8:35 pm
From: "Phillip Sitbon" <phillip.sit...@gmail.com>
Date: Fri, 16 Jun 2006 17:35:47 -0700
Local: Fri, Jun 16 2006 8:35 pm
Subject: Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)
Hey there- so I decided to heed your input and I created a Django
adapter for PyISAPIe, so now you can run Django in a true ISAPI
environment.  It seems to run without a hitch. As far as mapping
arbitrary paths, all you have to do is use the wildcard application map
to the DLL (assuming you have IIS6).

It's really easy to get going - if you download the newest version
(http://pyisapie.sourceforge.net)  you'll see the adapter with the
example Python code.

I did some performance testing with a few different apps included in
Django (I think it was an admin page and one of the hello apps) - I was
getting between 900 and 1700 requests per second. Hope that's good
enough for you ;)

I'm glad I was able to bring the two together so easily, considering
that my focus on the ISAPI part of the project has been so narrow that
I have yet to add tools similar to what Django already has.

Please let me know if you have questions, and enjoy!

 - Phillip


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google