Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-11-01 Thread Graham Dumpleton
If you are still using: WSGIScriptAlias / /var/www/wsgi-scripts/mywebtool.wsgi then your WSGI application will hide the original Apache document root directory. If you application is responding for both / and /mywebtool, then that is going to be because of how your Flask routes are set

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-31 Thread wc
I'm happy to report that I have the Flask app up and running. I cleaned up and double-checked my directories and made one change to the script: I renamed references of "app" to "application". This got my "hello world" app running, but once I did it have it running, I noticed that it would run

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread wc
I will check these in the morning. Thank you for all the help. On Monday, October 29, 2018 at 5:48:39 PM UTC-7, Graham Dumpleton wrote: > > You don't need to chmod +x the WSGI script file. > > Ensure you still have: > > from mywebtool import app as application > > in the WSGi script file. > >

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread Graham Dumpleton
Nothing should be cached from old version of file, but to be safe I would suggest stopping and starting Apache, trying again and seeing what error you get. Also see comments below. > On 30 Oct 2018, at 11:36 am, wc wrote: > > mywebtool.wsgi is indeed in the location you noted > > my virtual

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread wc
mywebtool.wsgi is indeed in the location you noted my virtual host section (showing the WSGIScriptAlias) is: ServerName my.server.edu DocumentRoot /var/www/FLASKAPPS Require all granted WSGIScriptAlias / /var/www/wsgi-scripts/mywebtool.wsgi

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread Graham Dumpleton
Where is 'mywebtool.wsgi'. The error suggests: /var/www/wsgi-scripts/mywebtool.wsgi yet, the error also says: [Mon Oct 29 15:55:30.446084 2018] [wsgi:error] [pid 20476] [client 60.248.94.241:50359] File "/var/www/wsgi-scripts/mywebtool.wsgi", line 1, in [Mon Oct 29 15:55:30.446150

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread wc
I believe I understand what you mean for the package vs. module structure. I get: $ ls -las /var/www/FLASKAPPS total 6 1 drwxr-xr-x 2 root wheel3 Oct 23 17:39 . 1 drwxr-xr-x 4 root wheel4 Oct 23 18:10 .. 5 -rw-r--r-- 1 wes wes148 Oct 23 17:33 mywebtool.py When I do the ls

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread Graham Dumpleton
> On 30 Oct 2018, at 11:16 am, wc wrote: > > Yes, my "mywebtool" is under > > /var/www/FLASKAPPS > > I'm assuming that Apache is running as user www, though I should check that > and check the permissions on the file. As I recall, I uploaded the files as > root because I was unable to

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread wc
Yes, my "mywebtool" is under /var/www/FLASKAPPS I'm assuming that Apache is running as user www, though I should check that and check the permissions on the file. As I recall, I uploaded the files as root because I was unable to modify the directory /var/www as myself from my ftp prog. I

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread Graham Dumpleton
Is your mywebtool module/package under: /var/www/FLASKAPPS or: /var/www/wsgi-scripts Are the directories/files readable to the user that Apache runs as? Is mod_wsgi compiled for Python 2.7 or 3.X? If mywebtool is a package, does it have an __init__.py file in it. Graham > On 30 Oct

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread wc
Thank you both for your replies. I now have a better understanding of the wsgi framework and I am using the error log to my advantage. I was able to find an error in my httpd.conf - I was using Apache 2.2 syntax in my directives, now I've updated it with the "Require all granted" and I am

Re: [modwsgi] Re: mod_wsgi problems on freeBSD

2018-10-29 Thread Graham Dumpleton
I'd agree on that except as noted. If the error message from the Apache error log is shown, along with configuration for your WSGI application in Apache config, as well as saying where your Python application code is located, that would help to give better idea of what is going on. > On 30