it works fine when no arguments passed in WSGIScriptAlias in httpd.conf

the problem is when I'm trying to pass IP and PORT as arguments 
*WSGIScriptAlias / "C:\Program Files\ofer\test\testService.wsgi" 
10.20.10.36 8080*

On Wednesday, August 3, 2016 at 9:21:19 AM UTC+3, Graham Dumpleton wrote:
>
> Try using forward slashes and not back slashes.
>
> Python will interpret a backslash before certain characters as a special 
> control character. Eg \t gets replaced with a tab. Thus use:
>
> import sys
> sys.path.insert(0, “C:/Program Files/ofer/testService”)
>
> The same goes when defining paths in the Apache configuration. Although 
> Apache is slightly tolerant to Windows type paths, it is better to use 
> POSIX style paths.
>
> Graham
>
> On 3 Aug 2016, at 4:14 PM, [email protected] <javascript:> wrote:
>
> I meant EDIT, and not FIX.
>
> it still doesn't work
>
> On Tuesday, August 2, 2016 at 5:42:41 PM UTC+3, [email protected] wrote:
>>
>> FIX:
>>
>> ...
>> *testService.wsgi:*
>>
>> import sys
>> sys.path.insert(0, "C:\Program Files\ofer\*testService*")
>>
>> ....
>>
>> On Tuesday, August 2, 2016 at 5:35:41 PM UTC+3, [email protected] wrote:
>>>
>>> hey all,
>>>
>>> I'm running Apache 2.4 on Windows.
>>>
>>> In httpd.conf I trying to run:
>>>
>>> WSGIScriptAlias / "C:\Program Files\ofer\test\testService.wsgi" 
>>> 10.20.10.36 8080
>>>
>>> *testService.wsgi:*
>>>
>>> import sys
>>> sys.path.insert(0, "C:\Program Files\ofer\test")
>>>
>>> from testService import app as application
>>> application.cache_host = sys.argv[1]
>>> application.cache_port = sys.argv[2]
>>>
>>>
>>> testService.py gets the IP and PORT from the user.
>>> I'm trying to pass arguments from httpd.conf all the way to 
>>> testService.py through the testService.wsgi,
>>> and I'm getting this Error:
>>> [wsgi:error] [pid 4772:tid 936] [client 10.3.101.31:2419] Target WSGI 
>>> script not found or unable to stat: C:/Program 
>>> Files/ofer/test/testService.wsgi 10.20.10.36 8080
>>>
>>> how can I do it?
>>>
>>> Thanks a lot,
>>> Ofer
>>>
>>
> -- 
> 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] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at https://groups.google.com/group/modwsgi.
> For more options, visit 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