> On 8 Sep 2016, at 7:01 AM, Roger Wayne <pervelli...@gmail.com> wrote:
> 
> Good gravy, I finally got it working! Well at least I can print out "Hello 
> World!". 
> So what worked for me is getting the corresponding .whl file from 
> http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi 
> <http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi> and changing the 
> extenzion to .zip and unpacking it. Once that is done, fine the mod_wsgi.so 
> and put it in the modules folder for Apache. Now here was the part that was 
> tripping me up all this time. When editing the httpd.conf file, I tried doing 
> what most others seem to have done and put in
> "LoadModule wsgi_module modules/mod_wsgi.so
> WSGIScriptAlias /<yourfoldername>"C:/xampp/htdocs/<yourfoldername>/"
> <Directory "C:/xampp/htdocs/<yourfoldername>">
>     Order allow,deny
>     Allow from all
> </Directory>"
> 
> My Apache would not even start up when I put that in there, but I noticed it 
> would at least start up if I left the 
> LoadModule line in there, so it was finding mod_wsgi.so fine. My next 
> assumption was maybe the syntax was wrong for my Apache even though it seems 
> to have worked for so many other people. What worked for me was
> "LoadModule wsgi_module modules/mod_wsgi.so
> WSGIScriptAlias /<folder_name> 
> "C:/xampp/htdocs/<folder_name>/<file_name>.py/wsgi"
> AddHandler wsgi-script .wsgi

You should not even need this AddHandler line.

The WSGIScriptAlias also looks a bit bogus still and how you have it will cause 
issues later if the WSGI application needs to know where it is mounted.

Generally you would if want WSGI application to appear at the root of the site 
use just:

    WSGIScriptAlias / "C:/xampp/htdocs/<folder_name>/<file_name>.py”

This would be accessed as:

    http://sitename/ <http://sitename/>

Alternately if you did want it access at a sub URL, you would use:

   WSGIScriptAlias /suburl "C:/xampp/htdocs/<folder_name>/<file_name>.py”

and access it as:

    http://sitename/suburl <http://sitename/suburl>

Graham

> <Directory "C:/xampp/htdocs/<folder_name>">
> Order allow,deny
> Allow from all
> </Directory>"
> 
> The filename extension can be either .wsgi or .py but NOT .cgi, so be careful 
> there. After that I was still running into trouble trying to get an example 
> script running and the Apache error logs main fuss was about the variable 
> that would contain my "Hello World!" was returning a str (sting) instead of a 
> bit string. If you can not get that example script running, or any script 
> really, because you get an error like then I suggest looking here 
> <http://stackoverflow.com/questions/34838443/typeerror-sequence-of-byte-string-values-expected-value-of-type-str-found>.
>   After all that was done, I was able to print out "Hello World!" finally. I 
> do still get some warnings in the error log saying something about 
> certificate not matching but I assume it is not that big of a deal. I hope 
> this helps anyone in the situation I was in.
> 
> Cheers
> 
> -- 
> 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 modwsgi+unsubscr...@googlegroups.com 
> <mailto:modwsgi+unsubscr...@googlegroups.com>.
> To post to this group, send email to modwsgi@googlegroups.com 
> <mailto:modwsgi@googlegroups.com>.
> 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 modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to