> On 5 Jan 2018, at 9:01 am, 'Sumeet Desai' via modwsgi 
> <[email protected]> wrote:
> 
> Hi Graham, 
> 
> I am facing a similar problem. 
> 
> pip install mod_wsgi was successful, I am using Python2.7 and Apache2.4 on 
> Windows 7 server with Django1.11 all on 64 bit.
> 
> I ran the mod_wsgi express config, it yielded me the following two lines:
> 
> LoadModule wsgi_module 
> "c:/python27/lib/site-packages/mod_wsgi/server/mod_wsgiNone"

It is meant to be:

    LoadModule wsgi_module 
"c:/python27/lib/site-packages/mod_wsgi/server/mod_wsgi.pyd"

You also need to make absolutely sure you have used 64 bit versions of Apache, 
Python and Microsoft C compilers. the Microsoft C compiler must me the VC9 
compiler for Python 2.7, you cannot use a newer compiler.

If you are lucky it may then work.

Some are reporting still doesn't work, likely because Apache is not built with 
VC9 compiler.

Better to use Python 3.6 and avoid Python 2.7.

Graham

> WSGIPythonHome "c:/python27"
> 
> The directory does not have mod_wsgi.py. So when I plug this into the 
> httpd.conf , the apache server wont start. Anything wrong with what I have 
> done?
> 
> Sumeet
> 
> On Tuesday, June 27, 2017 at 4:15:38 PM UTC-4, Graham Dumpleton wrote:
> 
>> On 27 Jun 2017, at 11:14 PM, Vigneshrajan <[email protected] <>> wrote:
>> 
>> working fine. but 
>> 
>> wsgi_app.py
>> 
>> def application(environ, start_response):
>>      status = '200 OK'
>>      output = b'Hello World!'
>> 
>>      response_headers = [('Content-type', 'text/plain'),
>>                          ('Content-Length', str(len(output)))]
>>      start_response(status, response_headers)
>> 
>>      return [output]
>> 
>> [Tue Jun 27 18:43:26.759052 2017] [wsgi:error] [pid 6656:tid 940] [client 
>> ::1:56396] mod_wsgi (pid=6656): Exception occurred processing WSGI script 
>> 'C:/wsgi_app/wsgi_app.py'.
>> [Tue Jun 27 18:43:26.759052 2017] [wsgi:error] [pid 6656:tid 940] [client 
>> ::1:56396] TypeError: sequence of byte string values expected, value of type 
>> str found\r
>> 
>> getting this error. i have changed the output type to byte. even though 
>> getting this error. 
> 
> 
> Did you restart Apache after modifying the file?
> 
> That code looks fine to me after having changed it to:
> 
>     output = b'Hello World!'
> 
> Graham
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi 
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to