I'am trying to run an wsgi script form within another wsgi script wit the
following statement.

pdata = subprocess.check_output( 'http://superhost.gr/' + page )

page = the location of another wsgi app.

The error i'am getting is:

mod_wsgi (pid=7152): Exception occurred processing WSGI script
'/home/nikos/public_html/app.py'
OSError: Apache/mod_wsgi failed to write response data: Broken pipe.

The other script by itself executes normally but NOT from within my app.py
script.

Any ideas on how to execute a wsgi app (b) from within a wsgi app(a) and
store the response as html data?

Στις Κυρ, 9 Σεπ 2018 στις 3:40 μ.μ., ο/η Graham Dumpleton <
[email protected]> έγραψε:

>
>
> On 9 Sep 2018, at 10:37 pm, Νίκος @ SuperHost <
> [email protected]> wrote:
>
> what must i do to make the location directive to work as it is clearer for
> me this way?
>
>
> I have no idea as PHP setups can vary.
>
> The pattern:
>
>     ^/(?!phpmyadmin)
>
> matches everything except a URL path starting with /phpmyadmin.
>
> So it doesn't capture the whole site, and /phpmyadmin goes through to be
> processed as normal.
>
>
> Στις Κυρ, 9 Σεπ 2018 στις 3:36 μ.μ., ο/η Νίκος @ SuperHost <
> [email protected]> έγραψε:
>
>> The 'location' directive did not work but the latter did!
>> Would you mind please exlaining it?
>>
>> Στις Κυρ, 9 Σεπ 2018 στις 2:00 μ.μ., ο/η Graham Dumpleton <
>> [email protected]> έγραψε:
>>
>>> If that does not work, instead change:
>>>
>>>   WSGIScriptAlias / /home/nikos/public_html/app.py process-group=app
>>> application-group=%{GLOBAL}
>>>
>>> to:
>>>
>>>   WSGIScriptAliasMatch ^/(?!phpmyadmin) /home/nikos/public_html/app.py
>>> process-group=app application-group=%{GLOBAL}
>>>
>>> That is, for just app.py, change WSGIScriptAlias to WSGIScriptAliasMatch
>>> and change the first argument from '/' to:
>>>
>>>     ^/(?!phpmyadmin)
>>>
>>> Graham
>>>
>>> On 9 Sep 2018, at 8:55 pm, Graham Dumpleton <[email protected]>
>>> wrote:
>>>
>>> This may or may not work depending on how PHP is setup. Add:
>>>
>>> <Location /phpmyadmin>
>>> SetHandler default-handler
>>> </Location>
>>>
>>> On 9 Sep 2018, at 6:35 pm, Νίκος Βέργος <[email protected]>
>>> wrote:
>>>
>>> phpmyadmin is a directory under /home/nikos/public_html/
>>>
>>>
>>> [root@superhost public_html]# ls -las
>>> total 72
>>>  4 drwxr-xr-x  6 nikos nikos  4096 Sep  9 11:04 .
>>>  4 drwx--x--x 12 nikos nikos  4096 Sep  9 01:28 ..
>>> 16 -rwxr-xr-x  1 nikos nikos 13235 Sep  9 11:31 app.py
>>> 16 -rwxr-xr-x  1 nikos nikos 14901 Sep  8 16:17 clientele.py
>>> 12 -rwxr-xr-x  1 nikos nikos  9439 Sep  8 16:17 downloads.py
>>>  4 drwxr-xr-x 11 nikos nikos  4096 Sep  9 00:11 phpmyadmin
>>>  4 drwxr-xr-x  4 nikos nikos  4096 Sep  8 09:47 private
>>>  4 -rw-------  1 nikos nikos  1408 Sep  8 09:47 sftp-config.json
>>>  4 drwxr-xr-x  6 nikos nikos  4096 Sep  8 09:52 static
>>>  4 drwxr-xr-x  2 nikos nikos  4096 Sep  8 09:52 templates
>>>
>>>
>>> Τη Κυριακή, 9 Σεπτεμβρίου 2018 - 11:32:58 π.μ. UTC+3, ο χρήστης Graham
>>> Dumpleton έγραψε:
>>>>
>>>> Is 'phpmyadmin' a directory under DocumentRoot, a 'phpmyadmin.php'
>>>> file, or is actually in 'index.php'?
>>>>
>>>> What do you get for 'ls -las' in the DocumentRoot directory?
>>>>
>>>
>>> --
>>> 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.
>>>
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "modwsgi" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/modwsgi/dAAP1mz_ekI/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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.
>>>
>>
> --
> 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.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "modwsgi" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/modwsgi/dAAP1mz_ekI/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

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