Graham, I have not captured traffic now that’s on port 80. I will do so
later. It might shed some light into this issue. The logs don’t show
meaningful errors.

On Sun, Sep 9, 2018 at 05:52 userneedshelp <[email protected]> wrote:

> I don't have an HTTP port 80 VS. I just enabled HTTP and disabled HTTPS -
> Brought the firewall down for testing. Still seeing the same behavior.
>
>
> On Saturday, September 8, 2018 at 8:43:52 PM UTC-7, Graham Dumpleton wrote:
>>
>> Do you have a HTTP (port 80) variant of the VirtualHost? Even if a
>> redirect back to HTTPS.
>>
>> Is it possible your application is generating responses with URLs that
>> use HTTP instead of HTTPS and so bouncing back to HTTP and that is causing
>> an issue?
>>
>> What happens if you try hosting it on port 80 alone initially?
>>
>> On 9 Sep 2018, at 1:38 pm, userneedshelp <[email protected]> wrote:
>>
>> Hi Graham. I am using flask-login and flask-ldap3-login - I did add
>> "WSGIPathAuthorization On" to the apache configuration but still get the
>> same result.
>>
>> <VirtualHost *:443>
>>
>>     ServerName hostname.domain.com
>>     #ServerAlias www.domain.com
>>     DocumentRoot /var/www/myflaskapp
>>     WSGIDaemonProcess myflaskapp processes=2 threads=15
>> python-home=/var/www/myappsite/env python-path=/var/www/myappsite/env
>>     WSGIScriptAlias / /var/www/myappsite/myflaskapp.wsgi
>>     WSGIApplicationGroup %{GLOBAL}
>>     WSGIPassAuthorization On
>> <Directory /var/www/myappsite>
>>         Options None
>>         WSGIProcessGroup myflaskapp
>>         WSGIApplicationGroup %{GLOBAL}
>>         Order allow,deny
>>         Allow from all
>>     </Directory>
>>
>>     ErrorLog /var/www/myappsite/logs/error.log
>>     CustomLog /var/www/myappsite/logs/requests.log combined
>>     LogLevel info
>>     SSLengine on
>>     SSLProtocol -all +TLSv1.2
>>     SSLcertificatefile /etc/pki/tls/certs/STAR.domain.com.crt
>>     SSLcertificatekeyfile /etc/pki/tls/private/myprivate.key
>> </VirtualHost>
>>
>>
>>
>> On Saturday, September 8, 2018 at 8:27:59 PM UTC-7, Graham Dumpleton
>> wrote:
>>>
>>> What is the mod_wsgi configuration?
>>>
>>> If you are using Flask to handle HTTP Basic authorisation, are you
>>> setting the directive:
>>>
>>>     WSGIPathAuthorization On
>>>
>>> On 9 Sep 2018, at 1:13 pm, userneedshelp <[email protected]> wrote:
>>>
>>> Hello! I have a Flask application running on CentOS7. I have user
>>> authentication setup now and working as expected when I run the app on the
>>> builtin Flask server (for debugging). The issue is that Authorization is
>>> not working 100% of the time when running the application on Apache with
>>> the help of mod_wsgi. When I run the Flask using the builtin server,
>>> authentication works each time. When I run the app via Apache, as soon as
>>> the user logs in, it should be going to a specific page but it's getting
>>> this error in the browser. Once I refresh the page, the user goes to the
>>> right page.
>>>
>>> Unauthorized
>>>
>>> The server could not verify that you are authorized to access the URL
>>>  requested.  You either supplied the wrong credentials (e.g. a bad
>>> password), or your browser doesn't understand how to supply the
>>> credentials required.
>>>
>>> *User->Login Page-> Home Page - Is desired*
>>>
>>>
>>> *User-Login Page->home - "Unauthorized" error message -> Then I hit f5
>>> (to refresh_ ->Home*
>>>
>>> This issue only happens when I am using Apache and not the guiltin Flask
>>>
>>>
>>> Any idea what could be happening?
>>>
>>>
>>>
>>> --
>>> 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 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 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.
>
-- 
Gerardo

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