But with if you get on the host where front end Apache is running and you use 
'curl' to access it using exact URL ProxyPass is using?

When you do access it via the Apache front end, with --log-level debug, does it 
log anything at all indicating the request is received by mod_wsgi-express?

> On 2 Apr 2020, at 6:59 pm, [email protected] wrote:
> 
> If I open the port on my firewall and access it directly at port 8001 
> (http://example.com:8001) with it works perfectly fine.
> 
> Am Donnerstag, 2. April 2020 09:45:09 UTC+2 schrieb Graham Dumpleton:
> So what happens when you access the backend directly?
> 
>> On 2 Apr 2020, at 5:49 pm, [email protected] <> wrote:
>> 
>> Thank you Graham, me setup is based on the blog posts you suggested. I 
>> started out with the ProxyPass not inside of Location and then tried all 
>> kinds of combinations, with no success. I had tried the following:
>> 
>>                 ProxyPass               /bla "http:// 
>> <http://www.google.com/url?q=http%3A%2F%2Fsrv-lab-t-495.zhaw.ch%3A8001%2F&sa=D&sntz=1&usg=AFQjCNFZ1bAXrhV627byubHJciYqOmnOvw>example.com
>>  
>> <http://www.google.com/url?q=http%3A%2F%2Fexample.com%2F&sa=D&sntz=1&usg=AFQjCNHbmhS24rOBWpzaMcUapS5k_3_-JQ>:8001/
>>  
>> <http://www.google.com/url?q=http%3A%2F%2Fsrv-lab-t-495.zhaw.ch%3A8001%2F&sa=D&sntz=1&usg=AFQjCNFZ1bAXrhV627byubHJciYqOmnOvw>"
>>                 ProxyPassReverse        /bla "http:// 
>> <http://srv-lab-t-495.zhaw.ch:8001/>example.com 
>> <http://www.google.com/url?q=http%3A%2F%2Fexample.com%2F&sa=D&sntz=1&usg=AFQjCNHbmhS24rOBWpzaMcUapS5k_3_-JQ>:8001/
>>  <http://srv-lab-t-495.zhaw.ch:8001/>"
>>                 RequestHeader set X-Forwarded-Proto "https"
>>  
>> Any other ideas on what the issue could be?
>> 
>> Am Donnerstag, 2. April 2020 01:36:03 UTC+2 schrieb Graham Dumpleton:
>> Usually you wouldn't put ProxyPass inside of Location. What happens when you 
>> don't use Location and instead use:
>> 
>>                   ProxyPass  /bla            "http://example.com 
>> <http://www.google.com/url?q=http%3A%2F%2Fexample.com%2F&sa=D&sntz=1&usg=AFQjCNHbmhS24rOBWpzaMcUapS5k_3_-JQ>:8001/"
>>                   ProxyPassReverse /bla      "http://example.com:8001/ 
>> <http://example.com:8001/>"
>> 
>> Note how the sub URL is the first argument to ProxyPass.
>> 
>> For more details related to proxying to mod_wsgi-express see:
>> 
>> http://blog.dscpl.com.au/2015/06/proxying-to-python-web-application.html 
>> <http://blog.dscpl.com.au/2015/06/proxying-to-python-web-application.html>
>> http://blog.dscpl.com.au/2015/07/redirection-problems-when-proxying-to.html 
>> <http://blog.dscpl.com.au/2015/07/redirection-problems-when-proxying-to.html>
>> 
>>> On 2 Apr 2020, at 6:46 am, rmoo...@ <>gmx.net <http://gmx.net/> wrote:
>>> 
>>> I have a frontend Apache that acts as a proxy to my backend 
>>> mod_wsgi-express proxy to fix an issue that I had before (see 
>>> https://groups.google.com/forum/#!topic/modwsgi/GTjMMm4wZJI 
>>> <https://groups.google.com/forum/#!topic/modwsgi/GTjMMm4wZJI>).
>>> 
>>> My front end configuration looks like this:
>>> <IfModule mod_ssl.c>
>>>         <VirtualHost _default_:443>
>>>                 ServerName example.com <http://example.com/>
>>>                 ServerAdmin  <>[email protected] <>
>>> 
>>>                 <Proxy *>
>>>                   AuthType Basic
>>>                   AuthUserFile /data/passwords/passwords.pwd
>>>                   AuthName "myDemoApp"
>>>                   <RequireAll>
>>>                     Require valid-user
>>>                   </RequireAll>
>>>                 </proxy>
>>> 
>>>                 <Location "/">
>>>                   ProxyPass              "http://example.com 
>>> <http://example.com/>:8001/"
>>>                   ProxyPassReverse       "http://example.com 
>>> <http://example.com/>:8001/"
>>>                   RequestHeader set X-Forwarded-Proto "https"
>>>                 </Location>
>>> 
>>>                 :
>>> 
>>>         </VirtualHost>
>>> </IfModule>
>>> 
>>> and my mod_wsgi-express looks like this:
>>> mod_wsgi-express setup-server /data/website/myApp/wsgi.py \
>>>     --reload-on-changes \
>>>     --port 8001 \
>>>     --user www-data --group www-data \
>>>     --server-root /var/www/my_app \
>>>     --log-level info \
>>>     --access-log
>>> 
>>> This setup works perfectly fine and opens my page when I go on 
>>> https://example.com <https://example.com/>. But I would like to use my 
>>> proxy to forward the requests to different backends, depending on the URL.
>>> 
>>> To this end, I changed the <Location "/"> to <Location "/bla/">. Not when I 
>>> open the website at https://example.com <https://example.com/> I get the 
>>> Apache2 Default Page, which is what I would expect. But when I try to open 
>>> https://example.com/bla/ <https://example.com/bla/> it simply doesn't load 
>>> the website (no error or something, just the Loading...). I don't get any 
>>> error, neither in the frontend nor in the backend log.
>>> 
>>> Does anybody have an idea what might be wrong with my configuration?
>>> 
>>> -- 
>>> 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 mod...@ <>googlegroups.com <http://googlegroups.com/>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/modwsgi/889266ce-91e2-4ac3-a9ed-0fd13e6d9ed6%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/modwsgi/889266ce-91e2-4ac3-a9ed-0fd13e6d9ed6%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> 
>> 
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/modwsgi/f5461cdd-e62a-4764-9216-ef7bf47da5e8%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/modwsgi/f5461cdd-e62a-4764-9216-ef7bf47da5e8%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/modwsgi/218165cc-50d2-4f2b-8989-9167b3127a6f%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/modwsgi/218165cc-50d2-4f2b-8989-9167b3127a6f%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/5824B189-06E7-406C-A16E-52D9A49E29F2%40gmail.com.

Reply via email to