Re: [modwsgi] fedora mod_wsgi django

2019-08-20 Thread Graham Dumpleton
BTW, you shouldn't be setting:

WSGIPythonPath 
"/usr/lib64/python3.7:/usr/lib64/python3.7/lib-dynload:/usr/lib64/python3.7/site-packages"

You do not need to include default locations.

What you should be setting WSGIPythonPath to is the parent directory of where 
your Python project is. See the Django docs:

https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/modwsgi/ 


You should also look at using daemon mode of mod_wsgi. It is the recommended 
deployment method.

> On 21 Aug 2019, at 10:24 am, Graham Dumpleton  
> wrote:
> 
> You don't actually show the exception details in the log that I can see. You 
> truncated it. It is the bit at the end of the traceback which is important as 
> that says what the exception is.
> 
>> On 21 Aug 2019, at 10:20 am, Bob Bobsled > > wrote:
>> 
>> Hi,
>> I'm struggling badly with mod_wsgi, python3, and django on fedora30.  Seems 
>> like everything is working alone, but I cannot get mod_wsgi to work with 
>> django, if that makes any sense.  In other words my django app works from 
>> runserver, and I can see the whiskey image from mod_wsgi, and can serve a 
>> simple python script with mod_wsgi, but cannot get the django production 
>> server approach working for my app using mod_wsgi with httpd (apache).
>> 
>> I've put my app (hawmusarchive) in several places to test such as 
>> /opt/hawmusarchive, or /var/www/hawmusarchive, or 
>> /var/www/html/hawmusarchive but all seem to get the internal server error so 
>> am appending httpd server log below which is showing issues with wsgi.py.  
>> I've checked permissions/ownership (777, apache:apache) on everything.
>> 
>> I'm not using venev, and am wondering if django being in 
>> /usr/lib/python3.7/site-packages (32bit), and mod_wsgi installed in 
>> /usr/lib64/python3.7/site-packages (64 bit) is confusing it for some reason?
>> 
>> I've worked thru my config.d file for wsgi alias, vhost carefully, and list 
>> it way below if somehow I buggered it to provoke the internal server error.
>> 
>> Any help/hints very greatly appreciated on perhaps where to keep looking.
>> 
>> Regards,
>> bob
>> 
>> EXCERPT from /var/log/httpd/error_logs:
>> 
>> [Mon Aug 19 15:00:13.855666 2019] [mpm_event:notice] [pid 5992:tid 
>> 140091650494784] AH00489: Apache/2.4.39 (Fedora) mod_wsgi/4.6.4 Python/3.7 
>> configured -- resuming normal operations
>> [Mon Aug 19 15:00:13.855688 2019] [core:notice] [pid 5992:tid 
>> 140091650494784] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
>> [Mon Aug 19 15:00:18.768792 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ] mod_wsgi (pid=5997): Failed to exec Python 
>> script file '/opt/hawmusarchive/hawmusarchive/wsgi.py'.
>> [Mon Aug 19 15:00:18.768873 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ] mod_wsgi (pid=5997): Exception occurred 
>> processing WSGI script '/opt/hawmusarchive/hawmusarchive/wsgi.py'.
>> [Mon Aug 19 15:00:18.769468 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ] Traceback (most recent call last):
>> [Mon Aug 19 15:00:18.769557 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ]   File 
>> "/opt/hawmusarchive/hawmusarchive/wsgi.py", line 16, in 
>> [Mon Aug 19 15:00:18.769566 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ] application = get_wsgi_application()
>> [Mon Aug 19 15:00:18.769575 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ]   File 
>> "/usr/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in 
>> get_wsgi_application
>> [Mon Aug 19 15:00:18.769613 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ] django.setup(set_prefix=False)
>> [Mon Aug 19 15:00:18.769621 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ]   File 
>> "/usr/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
>> [Mon Aug 19 15:00:18.769626 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ] 
>> configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
>> [Mon Aug 19 15:00:18.769633 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> ]   File 
>> "/usr/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in 
>> __getattr__
>> [Mon Aug 19 15:00:18.769637 2019] [wsgi:error] [pid 5997:tid 
>> 140091162883840] [client 128.171.51.150:41152 
>> 

Re: [modwsgi] fedora mod_wsgi django

2019-08-20 Thread Graham Dumpleton
You don't actually show the exception details in the log that I can see. You 
truncated it. It is the bit at the end of the traceback which is important as 
that says what the exception is.

> On 21 Aug 2019, at 10:20 am, Bob Bobsled  wrote:
> 
> Hi,
> I'm struggling badly with mod_wsgi, python3, and django on fedora30.  Seems 
> like everything is working alone, but I cannot get mod_wsgi to work with 
> django, if that makes any sense.  In other words my django app works from 
> runserver, and I can see the whiskey image from mod_wsgi, and can serve a 
> simple python script with mod_wsgi, but cannot get the django production 
> server approach working for my app using mod_wsgi with httpd (apache).
> 
> I've put my app (hawmusarchive) in several places to test such as 
> /opt/hawmusarchive, or /var/www/hawmusarchive, or /var/www/html/hawmusarchive 
> but all seem to get the internal server error so am appending httpd server 
> log below which is showing issues with wsgi.py.  I've checked 
> permissions/ownership (777, apache:apache) on everything.
> 
> I'm not using venev, and am wondering if django being in 
> /usr/lib/python3.7/site-packages (32bit), and mod_wsgi installed in 
> /usr/lib64/python3.7/site-packages (64 bit) is confusing it for some reason?
> 
> I've worked thru my config.d file for wsgi alias, vhost carefully, and list 
> it way below if somehow I buggered it to provoke the internal server error.
> 
> Any help/hints very greatly appreciated on perhaps where to keep looking.
> 
> Regards,
> bob
> 
> EXCERPT from /var/log/httpd/error_logs:
> 
> [Mon Aug 19 15:00:13.855666 2019] [mpm_event:notice] [pid 5992:tid 
> 140091650494784] AH00489: Apache/2.4.39 (Fedora) mod_wsgi/4.6.4 Python/3.7 
> configured -- resuming normal operations
> [Mon Aug 19 15:00:13.855688 2019] [core:notice] [pid 5992:tid 
> 140091650494784] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
> [Mon Aug 19 15:00:18.768792 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ] mod_wsgi 
> (pid=5997): Failed to exec Python script file 
> '/opt/hawmusarchive/hawmusarchive/wsgi.py'.
> [Mon Aug 19 15:00:18.768873 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ] mod_wsgi 
> (pid=5997): Exception occurred processing WSGI script 
> '/opt/hawmusarchive/hawmusarchive/wsgi.py'.
> [Mon Aug 19 15:00:18.769468 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ] Traceback (most 
> recent call last):
> [Mon Aug 19 15:00:18.769557 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ]   File 
> "/opt/hawmusarchive/hawmusarchive/wsgi.py", line 16, in 
> [Mon Aug 19 15:00:18.769566 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ] application 
> = get_wsgi_application()
> [Mon Aug 19 15:00:18.769575 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ]   File 
> "/usr/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in 
> get_wsgi_application
> [Mon Aug 19 15:00:18.769613 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ] 
> django.setup(set_prefix=False)
> [Mon Aug 19 15:00:18.769621 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ]   File 
> "/usr/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
> [Mon Aug 19 15:00:18.769626 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ] 
> configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
> [Mon Aug 19 15:00:18.769633 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ]   File 
> "/usr/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in 
> __getattr__
> [Mon Aug 19 15:00:18.769637 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ] 
> self._setup(name)
> [Mon Aug 19 15:00:18.769650 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ]   File 
> "/usr/lib/python3.7/site-packages/django/conf/__init__.py", line 44, in _setup
> [Mon Aug 19 15:00:18.769656 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ] 
> self._wrapped = Settings(settings_module)
> [Mon Aug 19 15:00:18.769673 2019] [wsgi:error] [pid 5997:tid 140091162883840] 
> [client 128.171.51.150:41152 ]   File 
> "/usr/lib/python3.7/site-packages/django/conf/__init__.py", line 107, in 
> __init__
> [Mon Aug 19 15:00:18.769677 2019] [wsgi:error] [pid 

[modwsgi] fedora mod_wsgi django

2019-08-20 Thread Bob Bobsled
Hi,
I'm struggling badly with mod_wsgi, python3, and django on fedora30.  Seems
like everything is working alone, but I cannot get mod_wsgi to work with
django, if that makes any sense.  In other words my django app works from
runserver, and I can see the whiskey image from mod_wsgi, and can serve a
simple python script with mod_wsgi, but cannot get the django production
server approach working for my app using mod_wsgi with httpd (apache).

I've put my app (hawmusarchive) in several places to test such as
/opt/hawmusarchive, or /var/www/hawmusarchive, or
/var/www/html/hawmusarchive but all seem to get the internal server error
so am appending httpd server log below which is showing issues with
wsgi.py.  I've checked permissions/ownership (777, apache:apache) on
everything.

I'm not using venev, and am wondering if django being in
/usr/lib/python3.7/site-packages (32bit), and mod_wsgi installed in
/usr/lib64/python3.7/site-packages (64 bit) is confusing it for some reason?

I've worked thru my config.d file for wsgi alias, vhost carefully, and list
it way below if somehow I buggered it to provoke the internal server error.

Any help/hints very greatly appreciated on perhaps where to keep looking.

Regards,
bob

EXCERPT from /var/log/httpd/error_logs:

[Mon Aug 19 15:00:13.855666 2019] [mpm_event:notice] [pid 5992:tid
140091650494784] AH00489: Apache/2.4.39 (Fedora) mod_wsgi/4.6.4 Python/3.7
configured -- resuming normal operations
[Mon Aug 19 15:00:13.855688 2019] [core:notice] [pid 5992:tid
140091650494784] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Aug 19 15:00:18.768792 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152] mod_wsgi (pid=5997): Failed
to exec Python script file '/opt/hawmusarchive/hawmusarchive/wsgi.py'.
[Mon Aug 19 15:00:18.768873 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152] mod_wsgi (pid=5997):
Exception occurred processing WSGI script
'/opt/hawmusarchive/hawmusarchive/wsgi.py'.
[Mon Aug 19 15:00:18.769468 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152] Traceback (most recent call
last):
[Mon Aug 19 15:00:18.769557 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152]   File
"/opt/hawmusarchive/hawmusarchive/wsgi.py", line 16, in 
[Mon Aug 19 15:00:18.769566 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152] application =
get_wsgi_application()
[Mon Aug 19 15:00:18.769575 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152]   File
"/usr/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in
get_wsgi_application
[Mon Aug 19 15:00:18.769613 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152]
django.setup(set_prefix=False)
[Mon Aug 19 15:00:18.769621 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152]   File
"/usr/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
[Mon Aug 19 15:00:18.769626 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152]
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Mon Aug 19 15:00:18.769633 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152]   File
"/usr/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in
__getattr__
[Mon Aug 19 15:00:18.769637 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152] self._setup(name)
[Mon Aug 19 15:00:18.769650 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152]   File
"/usr/lib/python3.7/site-packages/django/conf/__init__.py", line 44, in
_setup
[Mon Aug 19 15:00:18.769656 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152] self._wrapped =
Settings(settings_module)
[Mon Aug 19 15:00:18.769673 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152]   File
"/usr/lib/python3.7/site-packages/django/conf/__init__.py", line 107, in
__init__
[Mon Aug 19 15:00:18.769677 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152] mod =
importlib.import_module(self.SETTINGS_MODULE)
[Mon Aug 19 15:00:18.769684 2019] [wsgi:error] [pid 5997:tid
140091162883840] [client 128.171.51.150:41152]   File
"/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module

---


# httpd conf.d file for django.
# httpd.conf calls all conf.d files.

##LOAD MODULE
#this one was the system dnf install mod_wsgi-, from mod_wsgi-express-3
LoadModule wsgi_module "/usr/lib64/python3.7/site-packages/mod_wsgi/server/
mod_wsgi-py37.cpython-37m-x86_64-linux-gnu.so"

#this is the actual apache module location:
#LoadModule wsgi_module "/etc/httpd/modules/mod_wsgi_python3.so"

WSGIPythonHome "/usr"  #pyhon3 is under /usr/lib/python3.7 etc.
WSGIPythonPath
"/usr/lib64/python3.7:/usr/lib64/python3.7/lib-dynload:/usr/lib64/python3.7/site-packages"


Require all 

Re: [modwsgi] RHEL 7 mod_wsgi s.bind Permission denied errors

2019-08-20 Thread Jeremy Hawkins
not 100% sure why, but the issue is resolved.

I think there is an issue with the mod_wsgi not updating when changes are 
made to the application.
There was a change to the form to make a field optional instead of required 
and that change didn't seem to push through.
I finally was able to get errors from the form validation.  restarting the 
Apache process then testing again and it seems to be working. 



On Monday, August 19, 2019 at 8:15:34 PM UTC-5, Graham Dumpleton wrote:
>
> And what was the original URL the POST request was made against?
>
> How is the Flask handler defined which is meant to handle the URL for the 
> POST request?
>
> On 20 Aug 2019, at 1:42 am, Jeremy Hawkins  > wrote:
>
> The alias is at /online
> WSGIScriptAlias /online /var/projects/janus/app.wsgi
>
> The location header is 
> Location: 
> https://sy-devsophia.hccs.edu/online/admin/faculty/30087
>
>
>
> On Friday, August 16, 2019 at 4:24:33 PM UTC-5, Graham Dumpleton wrote:
>>
>> At what sub path to the site are the post requests being targeted?
>>
>> Sounds more like you have an issue where handler is at /subpath/, but you 
>> are using /subpath, and so trailing slash redirection is being tripped.
>>
>> What does the Location header in responses say?
>>
>> How do you have WSGIScriptAlias set in the Apache config?
>>
>> On 17 Aug 2019, at 6:14 am, Jeremy Hawkins  wrote:
>>
>> Thank you.  Removing the app.run() and changing the app to application 
>> (using a factory so changed app = create_app() --> application = 
>> create_app())
>>
>> Now when running the site via apache the post requests don't seem to be 
>> running.  They all return the http code of 302 (found) instead of 200 like 
>> they do when I run the app directly in python.  I am not seeing any errors 
>> in any logs and the path the post is using is being formed correctly by the 
>> url_for function.  I'd almost say the post request aren't passing data to 
>> the wsgi application?
>>
>> On Friday, August 16, 2019 at 1:21:16 AM UTC-5, Graham Dumpleton wrote:
>>>
>>> You shouldn't be invoking app.run() when hosting under mod_wsgi as that 
>>> is trying to start its own server.
>>>
>>> You should use a check like:
>>>
>>> if __name__ == "__main__":
>>> 
>>>
>>> around the parts of the Flask code where the Flask development server is 
>>> started so that it isn't run when that file is imported in a context other 
>>> than being a main program.
>>>
>>> What mod_wsgi is expecting is a WSGI application entry point called 
>>> "application". See:
>>>
>>> https://flask.palletsprojects.com/en/1.1.x/deploying/mod_wsgi/
>>>
>>> On 16 Aug 2019, at 4:34 am, Jeremy Hawkins  wrote:
>>>
>>> I am trying to run a flask app as a script with Apache 2.4 under a Red 
>>> Hat Enterprise Linux 7.6
>>>
>>> I got the app to the point where it will run if a do use python app.wsgi 
>>> (within that directory).
>>>
>>> When I try to run it from apach using the mod_wsgi I get the following 
>>> errors in the logs.
>>>
>>> I have tried everything that I can run across to try to resolve this 
>>> issue.  I am at a lost to even figure what is actually causing this issue.
>>>
>>>
>>> Error Log:
>>> mod_wsgi (pid=4159): Exception occurred processing WSGI script 
>>> '/var/projects/janus/app.wsgi'.
>>> Traceback (most recent call last):
>>> File "/var/projects/janus/app.wsgi", line 11, in 
>>> app.run(host="0.0.0.0")
>>> File 
>>> "/var/projects/janus/venv/lib/python3.6/site-packages/flask/app.py", line 
>>> 990, in run
>>> run_simple(host, port, self, **options)
>>> File 
>>> "/var/projects/janus/venv/lib/python3.6/site-packages/werkzeug/serving.py", 
>>> line 987, in run_simple
>>> s.bind(server_address)
>>> PermissionError: [Errno 13] Permission denied
>>>
>>>
>>> -- 
>>> 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.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/modwsgi/6ffd7529-a989-45de-9ce3-5b3466915623%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>>
>>>
>> -- 
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/modwsgi/103fd512-f17f-40ab-8744-01972ca81aee%40googlegroups.com
>>  
>> 
>> .
>>
>>
>>
> -- 
> 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 

Re: [modwsgi] RHEL 7 mod_wsgi s.bind Permission denied errors

2019-08-20 Thread Jeremy Hawkins
I hope this is what you're asking for.

The form is in a dialog inside of a page that is located at 
online/admin/faculty/
the form action is set to {{url_for('admin.update_faculty', 
id=faculty.facultyno)}} which converts to /online/admin/faculty/ and 
the method is post.

The headers for the request is:


   1. Request URL: 
   https://sy-devsophia.hccs.edu/online/admin/faculty/901162977
   2. Request Method: 
   POST
   
The location is the response header is:
Location: 
https://sy-devsophia.hccs.edu/online/admin/faculty/901162977


The url rules for both of these locations are:


blueprint.add_url_rule(
'/faculty/', endpoint='get_faculty', view_func=get_faculty)

blueprint.add_url_rule('/faculty/', endpoint='update_faculty',
view_func=update_faculty, methods=['POST'])

The update_faculty does end with a return 
redirect(url_for('admin.get_faculty',id=id))
I am wondering if this is the reason the response code is 302 instead of 
200.
I do have logger statements at the start of the update_faculty method which 
runs, but additional logger statements in the method do not run.

On Monday, August 19, 2019 at 8:15:34 PM UTC-5, Graham Dumpleton wrote:
>
> And what was the original URL the POST request was made against?
>
> How is the Flask handler defined which is meant to handle the URL for the 
> POST request?
>
> On 20 Aug 2019, at 1:42 am, Jeremy Hawkins  > wrote:
>
> The alias is at /online
> WSGIScriptAlias /online /var/projects/janus/app.wsgi
>
> The location header is 
> Location: 
> https://sy-devsophia.hccs.edu/online/admin/faculty/30087
>
>
>
> On Friday, August 16, 2019 at 4:24:33 PM UTC-5, Graham Dumpleton wrote:
>>
>> At what sub path to the site are the post requests being targeted?
>>
>> Sounds more like you have an issue where handler is at /subpath/, but you 
>> are using /subpath, and so trailing slash redirection is being tripped.
>>
>> What does the Location header in responses say?
>>
>> How do you have WSGIScriptAlias set in the Apache config?
>>
>> On 17 Aug 2019, at 6:14 am, Jeremy Hawkins  wrote:
>>
>> Thank you.  Removing the app.run() and changing the app to application 
>> (using a factory so changed app = create_app() --> application = 
>> create_app())
>>
>> Now when running the site via apache the post requests don't seem to be 
>> running.  They all return the http code of 302 (found) instead of 200 like 
>> they do when I run the app directly in python.  I am not seeing any errors 
>> in any logs and the path the post is using is being formed correctly by the 
>> url_for function.  I'd almost say the post request aren't passing data to 
>> the wsgi application?
>>
>> On Friday, August 16, 2019 at 1:21:16 AM UTC-5, Graham Dumpleton wrote:
>>>
>>> You shouldn't be invoking app.run() when hosting under mod_wsgi as that 
>>> is trying to start its own server.
>>>
>>> You should use a check like:
>>>
>>> if __name__ == "__main__":
>>> 
>>>
>>> around the parts of the Flask code where the Flask development server is 
>>> started so that it isn't run when that file is imported in a context other 
>>> than being a main program.
>>>
>>> What mod_wsgi is expecting is a WSGI application entry point called 
>>> "application". See:
>>>
>>> https://flask.palletsprojects.com/en/1.1.x/deploying/mod_wsgi/
>>>
>>> On 16 Aug 2019, at 4:34 am, Jeremy Hawkins  wrote:
>>>
>>> I am trying to run a flask app as a script with Apache 2.4 under a Red 
>>> Hat Enterprise Linux 7.6
>>>
>>> I got the app to the point where it will run if a do use python app.wsgi 
>>> (within that directory).
>>>
>>> When I try to run it from apach using the mod_wsgi I get the following 
>>> errors in the logs.
>>>
>>> I have tried everything that I can run across to try to resolve this 
>>> issue.  I am at a lost to even figure what is actually causing this issue.
>>>
>>>
>>> Error Log:
>>> mod_wsgi (pid=4159): Exception occurred processing WSGI script 
>>> '/var/projects/janus/app.wsgi'.
>>> Traceback (most recent call last):
>>> File "/var/projects/janus/app.wsgi", line 11, in 
>>> app.run(host="0.0.0.0")
>>> File 
>>> "/var/projects/janus/venv/lib/python3.6/site-packages/flask/app.py", line 
>>> 990, in run
>>> run_simple(host, port, self, **options)
>>> File 
>>> "/var/projects/janus/venv/lib/python3.6/site-packages/werkzeug/serving.py", 
>>> line 987, in run_simple
>>> s.bind(server_address)
>>> PermissionError: [Errno 13] Permission denied
>>>
>>>
>>> -- 
>>> 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.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/modwsgi/6ffd7529-a989-45de-9ce3-5b3466915623%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>>
>>>
>> -- 
>> You received this