You seem to have ignored how I said to set it up previously. I said to use:

<Directory /home/nikos/public_html>
    AllowOverride None
    Require all granted
</Directory>

WSGIDaemonProcess downloads user=nikos group=nikos threads=5
WSGIScriptAlias /downloads /home/nikos/public_html/downloads.py 
process-group=downloads application-group=%{GLOBAL}

WSGIDaemonProcess clientele user=nikos group=nikos threads=5
WSGIScriptAlias /clientele /home/nikos/public_html/clientele.py 
process-group=clientele application-group=%{GLOBAL}

WSGIDaemonProcess app user=nikos group=nikos threads=5
WSGIScriptAlias / /home/nikos/public_html/app.py process-group=app 
application-group=%{GLOBAL}

You can't run the three separate apps in the one interpreter context when using 
Flask as they will interfere with each other.

> On 7 Sep 2018, at 7:16 pm, Νίκος @ SuperHost <[email protected]> 
> wrote:
> 
> Here is the error log when i try torun by browser clientele.py
> 
> [Fri Sep 07 12:10:39.767400 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>] [2018-09-07 12:10:39,767] 
> ERROR in app: Exception on /clientele.py [GET]
> [Fri Sep 07 12:10:39.767434 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>] Traceback (most recent 
> call last):
> [Fri Sep 07 12:10:39.767437 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
> [Fri Sep 07 12:10:39.767450 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     response = 
> self.full_dispatch_request()
> [Fri Sep 07 12:10:39.767453 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 1815, in 
> full_dispatch_request
> [Fri Sep 07 12:10:39.767456 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     rv = 
> self.handle_user_exception(e)
> [Fri Sep 07 12:10:39.767458 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 1718, in 
> handle_user_exception
> [Fri Sep 07 12:10:39.767461 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     reraise(exc_type, 
> exc_value, tb)
> [Fri Sep 07 12:10:39.767463 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
> [Fri Sep 07 12:10:39.767466 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     raise value
> [Fri Sep 07 12:10:39.767469 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 1813, in 
> full_dispatch_request
> [Fri Sep 07 12:10:39.767471 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     rv = 
> self.dispatch_request()
> [Fri Sep 07 12:10:39.767474 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 1799, in 
> dispatch_request
> [Fri Sep 07 12:10:39.767476 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     return 
> self.view_functions[rule.endpoint](**req.view_args)
> [Fri Sep 07 12:10:39.767479 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/home/nikos/public_html/app.py", line 337, in index
> [Fri Sep 07 12:10:39.767481 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     cur.execute( '''SELECT 
> hits FROM pages WHERE url = %s''', page )
> [Fri Sep 07 12:10:39.767484 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib64/python3.6/site-packages/pymysql/cursors.py", line 170, in execute
> [Fri Sep 07 12:10:39.767486 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     result = 
> self._query(query)
> [Fri Sep 07 12:10:39.767489 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib64/python3.6/site-packages/pymysql/cursors.py", line 328, in _query
> [Fri Sep 07 12:10:39.767491 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     conn.query(q)
> [Fri Sep 07 12:10:39.767494 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib64/python3.6/site-packages/pymysql/connections.py", line 515, in 
> query
> [Fri Sep 07 12:10:39.767496 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     
> self._execute_command(COMMAND.COM_QUERY, sql)
> [Fri Sep 07 12:10:39.767499 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]   File 
> "/usr/lib64/python3.6/site-packages/pymysql/connections.py", line 745, in 
> _execute_command
> [Fri Sep 07 12:10:39.767502 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>]     raise 
> err.InterfaceError("(0, '')")
> [Fri Sep 07 12:10:39.767509 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>] 
> pymysql.err.InterfaceError: (0, '')
> [Fri Sep 07 12:10:39.767530 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7639 <http://46.103.174.201:7639/>] 
> [Fri Sep 07 12:10:40.216819 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>] [2018-09-07 12:10:40,216] 
> ERROR in app: Exception on /favicon.ico [GET]
> [Fri Sep 07 12:10:40.216876 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>] Traceback (most recent 
> call last):
> [Fri Sep 07 12:10:40.216883 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
> [Fri Sep 07 12:10:40.216889 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     response = 
> self.full_dispatch_request()
> [Fri Sep 07 12:10:40.216895 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 1815, in 
> full_dispatch_request
> [Fri Sep 07 12:10:40.216920 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     rv = 
> self.handle_user_exception(e)
> [Fri Sep 07 12:10:40.216927 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 1718, in 
> handle_user_exception
> [Fri Sep 07 12:10:40.216932 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     reraise(exc_type, 
> exc_value, tb)
> [Fri Sep 07 12:10:40.216938 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
> [Fri Sep 07 12:10:40.216943 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     raise value
> [Fri Sep 07 12:10:40.216949 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 1813, in 
> full_dispatch_request
> [Fri Sep 07 12:10:40.216954 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     rv = 
> self.dispatch_request()
> [Fri Sep 07 12:10:40.216960 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/usr/lib/python3.6/site-packages/flask/app.py", line 1799, in 
> dispatch_request
> [Fri Sep 07 12:10:40.216965 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     return 
> self.view_functions[rule.endpoint](**req.view_args)
> [Fri Sep 07 12:10:40.216971 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/home/nikos/public_html/app.py", line 337, in index
> [Fri Sep 07 12:10:40.216976 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     cur.execute( '''SELECT 
> hits FROM pages WHERE url = %s''', page )
> [Fri Sep 07 12:10:40.216981 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:76 <http://46.103.174.201:76/> 40]   File 
> "/usr/lib64/python3.6/site-packages/pymysql/cursors.py", line 170, in execute
> [Fri Sep 07 12:10:40.216987 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     result = 
> self._query(query)
> [Fri Sep 07 12:10:40.216992 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/usr/lib64/python3.6/site-packages/pymysql/cursors.py", line 328, in _query
> [Fri Sep 07 12:10:40.216998 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     conn.query(q)
> [Fri Sep 07 12:10:40.217003 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/usr/lib64/python3.6/site-packages/pymysql/connections.py", line 515, in 
> query
> [Fri Sep 07 12:10:40.217009 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     
> self._execute_command(COMMAND.COM_QUERY, sql)
> [Fri Sep 07 12:10:40.217014 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]   File 
> "/usr/lib64/python3.6/site-packages/pymysql/connections.py", line 745, in 
> _execute_command
> [Fri Sep 07 12:10:40.217020 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>]     raise 
> err.InterfaceError("(0, '')")
> [Fri Sep 07 12:10:40.217027 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>] 
> pymysql.err.InterfaceError: (0, '')
> [Fri Sep 07 12:10:40.217059 2018] [wsgi:error] [pid 10994] [remote 
> 46.103.174.201:7640 <http://46.103.174.201:7640/>] 
> 
> 
> I dont understand why its tryign to load 'app/py' when i give 
> 'http://superhost.gr/clientele.py <http://superhost.gr/clientele.py>' 
> and this is how i have the directives in the main config.
> 
>     WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5
>     WSGIProcessGroup public_html
>     WSGIApplicationGroup %{GLOBAL}
> 
>     WSGIScriptAlias /downloads /home/nikos/public_html/downloads.py
>     WSGIScriptAlias /clientele /home/nikos/public_html/clientele.py
>     WSGIScriptAlias / /home/nikos/public_html/app.py
> 
>     <Directory /home/nikos/public_html>
>         Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
>         Require all granted
>     </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] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi 
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <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