Here's the apache config relevant to wsgi:

LoadModule wsgi_module modules/mod_wsgi.so

<Directory /docs/content/scripts>
        Addhandler cgi-script .py
        AddHandler wsgi-script .wsgi
        Options +ExecCGI
</Directory>

<LocationMatch "^/scripts/targeted(.+)">
Order Deny,Allow
Deny from All
Allow from x.x.x.x x.x.x.x
</LocationMatch>

<LocationMatch "^/scripts/(refresh).+">
Order Deny,Allow
Deny from All
Allow from x.x.x.x x.x.x.x
</LocationMatch>

WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess wsgi user=wsgi1 group=wsgi threads=1 display-name=%
{GROUP} python-path=/docs/python2.5/lib/python2.5/site-packages/
scripts
WSGIProcessGroup wsgi
WSGIScriptAlias /scripts/targeted_content_test /docs/content/scripts/
targeted_content_test.wsgi
WSGIScriptAlias /scripts/targeted_content /docs/content/scripts/
targeted_content.wsgi
WSGIScriptAlias /scripts/refresh /docs/content/scripts/refresh.wsgi


Thanks
Imtiaz

On Jan 25, 5:45 pm, Graham Dumpleton <[email protected]>
wrote:
> 2010/1/26 contactimtiaz <[email protected]>:
>
> > Hi
> > Is there a way to know if my wsgi script is not running as CGI?
>
> There is, but there shouldn't ever be a need.
>
> > Also,
> > while setting response headers, why can't we set them with new line?
>
> Because with WSGI you don't have to.
>
> > Do the new lines get added implicitly by send_response?
>
> Not exactly, where they are added is dependent on the WSGI adapter
> implementation. In the case of Apache/mod_wsgi they are added by
> Apache.
>
> > We are running wsgi under apache and apparently apache needs a newline
> > after the content-type header. We are seeing intermittent "Premature
> > end of script headers" in our wsgi setup.
>
> Then I would question whether you are actually using Apache/mod_wsgi.
> You sure you aren't using CGI and just doing things wrongly.
>
> If the script is small, can you provide it so we can see what you are
> doing and confirm that you are doing things correctly and even using
> WSGI.
>
> The snippets of Apache configuration you are using to configure
> mod_wsgi would also be useful.
>
> Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en.

Reply via email to