Basically I would like to have the option of using the python
webserver or apache.

So here is a nice example posted using a form (basic wgsi example):
http://webpython.codepoint.net/wsgi_request_parsing_get

Its set up to run through the python webserver, but how can you get it
to run through Apache?

thanks,
Richard

On Tue, Nov 8, 2011 at 10:21 PM, Richard Rouse
<[email protected]> wrote:
> Hi Graham,
>
> To test whether I configured wgsi, I used the script from the
> QuickConfigurationGuide -
> http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
>
> I sort of read the discussions, copied what was done in this message::
> http://www.mail-archive.com/[email protected]/msg01518.html
>
> So basically I edited Apache to include this virtual host:
>
> <VirtualHost *:80>
>    ServerAdmin webmaster@localhost
>    DocumentRoot /var/www/
>    WSGIScriptAlias /foobar /var/www/aj/cgi-bin/foobar/baz.py
>    CustomLog /var/log/apache2/access.log combined
>    ErrorLog /var/log/apache2/error.log
>    LogLevel info
> </VirtualHost>
>
> I installed mod_wsgi-3.3.
>
> I moved this baz.py script out of cgi-bin and it works fine. Just
> can't figure out how to get an app to run through apache
>
>
> thanks,
> Richard
>
>
> On Tue, Nov 8, 2011 at 9:23 PM, Graham Dumpleton
> <[email protected]> wrote:
>> On 9 November 2011 16:17, Richard Rouse <[email protected]> wrote:
>>> Hello,
>>>
>>> I am a newbie and have been stuck trying to serve pyramid applications
>>> through apache using mod_wsgi. I think I have successfully configured
>>> mod_wsgi since when restarting apache I get this printed in error log
>>> file:
>>>
>>> Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch
>>> mod_wsgi/3.3 Python/2.6.6 configured -- resuming normal operations
>>>
>>> Also I can run the 'hello world' wgsi script through cgi-bin.
>>
>> And what mod_wsgi configuration did you add into Apache to do that?
>>
>> You wouldn't usually put WSGI scripts in cgi-bin as Apache would be
>> setup to execute them as CGI scripts.
>>
>>> I think the problem I am having is using a wgsi script to redirect a
>>> pyramid app through apache. I have been following this recipe posted:
>>> http://docs.pylonsproject.org/projects/pyramid/1.0/tutorials/modwsgi/index.html
>>>
>>> After I serve the application, apache keeps looking for the
>>> application in the web root (ie., '/var/www/myapp') rather then my
>>> home directory where I set up the pyramid app.
>>>
>>> Here is the wgsi script that I am using for the redirect:
>>> from pyramid.paster import get_app
>>> application = get_app('/home/richard/modwsgi/env/myapp/
>>> production.ini', 'main')
>>
>> With what mod_wsgi configuration in Apache config file?
>>
>> Suggest you might watch the first part of:
>>
>>  http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations
>>
>> where it explain setup of WSGI hello world to ensure you are doing
>> that the right way.
>>
>> If you haven't already, follow through:
>>
>>  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
>>
>> 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.
>>
>>
>
>
>
> --
> Richard Rouse
> HTS Resources, LLC.
> 325 W. Washington St. #2-150
> San Diego, CA 92103 USA
> 619-846-8291
> [email protected]
> www.htsresources.com
>



-- 
Richard Rouse
HTS Resources, LLC.
325 W. Washington St. #2-150
San Diego, CA 92103 USA
619-846-8291
[email protected]
www.htsresources.com

-- 
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