Database queries are correct dont mind about this fetch error, it always
said this months now but the value is being returned.

Yes all 3 wsgi apps use requsts than fetched envirromental variables but
that is nto the issue here because if mod_wsgi had probelm returnign them
then main.py woudl also fail to laod as well.

Shall i use ProxyPass so to directly all http traffic to flask develpoment
server instance to handle the code and send data back to Apache?

Στις Παρ, 7 Σεπ 2018 στις 3:23 μ.μ., ο/η Graham Dumpleton <
[email protected]> έγραψε:

> So there is no code mixing now that you have separated apps into separate
> processes.
>
> Now your issue is that it seems your database queries are not returning
> any results. That is an issue you will need to solve.
>
> One last thing I will say though is that keep in mind that if your code is
> dependent on environment variables in your personal user account, they will
> not be seen by the application when running under Apache.
>
> Add debugging code to print out messages validating your database
> configuration used by the application is correct, and ensure that you
> aren't ignore errors from the database, and that you are properly validate
> the results you get. You need to use basic debugging steps now to work this
> out yourself.
>
> On 7 Sep 2018, at 10:15 pm, Νίκος @ SuperHost <
> [email protected]> wrote:
>
> Yes, i ahve modifies http.conf to
>
>
>
> WSGIDaemonProcess main user=nikos group=nikos threads=5 
> home=/home/nikos/public_html
> WSGIScriptAlias / /home/nikos/public_html/main.py process-group=main 
> application-group=%{GLOBAL}
>
>
> and renamed app.py to main.py and restarted apache
>
>
> [root@superhost public_html]# ll
> total 60
> -rwxr-xr-x 1 nikos nikos 14437 Sep  7 14:53 clientele.py
> -rwxr-xr-x 1 nikos nikos  9766 Sep  7 14:53 downloads.py
> -rwxr-xr-x 1 nikos nikos 13297 Sep  7 12:01 main.py
> drwxr-xr-x 4 nikos nikos  4096 Sep  5 21:59 private
> -rw------- 1 nikos nikos  1408 Sep  5 21:59 sftp-config.json
> drwxr-xr-x 6 nikos nikos  4096 Sep  5 22:05 static
> drwxr-xr-x 2 nikos nikos  4096 Sep  5 22:05 templates
> [root@superhost public_html]#
>
> and the error is:
>
>
> [root@superhost public_html]# systemctl restart httpd
> [root@superhost public_html]# tail -f ../logs/error_log
> [Fri Sep 07 15:15:06.024468 2018] [wsgi:info] [pid 17701] mod_wsgi 
> (pid=17701): Exiting process 'main'.
> [Fri Sep 07 15:15:06.200115 2018] [wsgi:info] [pid 17883] mod_wsgi 
> (pid=17883): Attach interpreter ''.
> [Fri Sep 07 15:15:06.218236 2018] [wsgi:info] [pid 17884] mod_wsgi 
> (pid=17884): Attach interpreter ''.
> [Fri Sep 07 15:15:06.225575 2018] [wsgi:info] [pid 17882] mod_wsgi 
> (pid=17882): Attach interpreter ''.
> [Fri Sep 07 15:15:06.234264 2018] [wsgi:info] [pid 17883] mod_wsgi 
> (pid=17883): Imported 'mod_wsgi'.
> [Fri Sep 07 15:15:06.234352 2018] [wsgi:info] [pid 17883] mod_wsgi 
> (pid=17883, process='clientele', application=''): Loading Python script file 
> '/home/nikos/public_html/clientele.py'.
> [Fri Sep 07 15:15:06.281984 2018] [wsgi:info] [pid 17882] mod_wsgi 
> (pid=17882): Imported 'mod_wsgi'.
> [Fri Sep 07 15:15:06.282110 2018] [wsgi:info] [pid 17882] mod_wsgi 
> (pid=17882, process='downloads', application=''): Loading Python script file 
> '/home/nikos/public_html/downloads.py'.
> [Fri Sep 07 15:15:06.298443 2018] [wsgi:info] [pid 17884] mod_wsgi 
> (pid=17884): Imported 'mod_wsgi'.
> [Fri Sep 07 15:15:06.298542 2018] [wsgi:info] [pid 17884] mod_wsgi 
> (pid=17884, process='main', application=''): Loading Python script file 
> '/home/nikos/public_html/main.py'.
> [Fri Sep 07 15:15:17.814760 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931] [2018-09-07 15:15:17,812] ERROR in app: Exception on 
> /favicon.ico [GET]
> [Fri Sep 07 15:15:17.814828 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931] Traceback (most recent call last):
> [Fri Sep 07 15:15:17.814835 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]   File "/usr/lib/python3.6/site-packages/flask/app.py", 
> line 2292, in wsgi_app
> [Fri Sep 07 15:15:17.814842 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]     response = self.full_dispatch_request()
> [Fri Sep 07 15:15:17.814847 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]   File "/usr/lib/python3.6/site-packages/flask/app.py", 
> line 1815, in full_dispatch_request
> [Fri Sep 07 15:15:17.814853 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]     rv = self.handle_user_exception(e)
> [Fri Sep 07 15:15:17.814859 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]   File "/usr/lib/python3.6/site-packages/flask/app.py", 
> line 1718, in handle_user_exception
> [Fri Sep 07 15:15:17.814865 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]     reraise(exc_type, exc_value, tb)
> [Fri Sep 07 15:15:17.814870 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]   File 
> "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
> [Fri Sep 07 15:15:17.814876 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]     raise value
> [Fri Sep 07 15:15:17.814881 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]   File "/usr/lib/python3.6/site-packages/flask/app.py", 
> line 1813, in full_dispatch_request
> [Fri Sep 07 15:15:17.814887 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]     rv = self.dispatch_request()
> [Fri Sep 07 15:15:17.814892 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]   File "/usr/lib/python3.6/site-packages/flask/app.py", 
> line 1799, in dispatch_request
> [Fri Sep 07 15:15:17.814898 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]     return 
> self.view_functions[rule.endpoint](**req.view_args)
> [Fri Sep 07 15:15:17.814904 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]   File "/home/nikos/public_html/main.py", line 338, in 
> index
> [Fri Sep 07 15:15:17.814909 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]     pagehit = cur.fetchone()[0]
> [Fri Sep 07 15:15:17.814917 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931] TypeError: 'NoneType' object is not subscriptable
> [Fri Sep 07 15:15:17.814949 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9931]
> [Fri Sep 07 15:15:17.895627 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9929] mod_wsgi (pid=17884): Exception occurred processing WSGI 
> script '/home/nikos/public_html/main.py'.
> [Fri Sep 07 15:15:17.895851 2018] [wsgi:error] [pid 17884] [remote 
> 46.103.174.201:9929] OSError: Apache/mod_wsgi failed to write response data: 
> Broken pipe.
>
>
>
>
> Στις Παρ, 7 Σεπ 2018 στις 3:09 μ.μ., ο/η Graham Dumpleton <
> [email protected]> έγραψε:
>
>> You are telling me that even though the app.py file no longer exists, you
>> are getting the exact same error message and stack trace which shows:
>>
>> File "/home/nikos/public_html/app.py", line 338, in index
>>
>> If you aren't, it isn't really the same, so without seeing it I can't
>> comment.
>>
>> Graham
>>
>> On 7 Sep 2018, at 10:06 pm, Νίκος @ SuperHost <
>> [email protected]> wrote:
>>
>> After changin to main.py
>> superhost.gr continues to run
>>
>> biut the other 2 separate wsgi script keep providing the same weeor
>> message.
>>
>> Στις Παρ, 7 Σεπ 2018 στις 2:58 μ.μ., ο/η Graham Dumpleton <
>> [email protected]> έγραψε:
>>
>>> Rename your app.py file to main.py and change app.py in the Apache
>>> configuration to main.py as well and restart Apache.
>>>
>>> See if anything breaks because it now can't import app module, or if
>>> some other error occurs.
>>>
>>> Also, if you have any .pyc file (compiled byte code files) in the same
>>> directory, remove them.
>>>
>>> On 7 Sep 2018, at 9:44 pm, Νίκος @ SuperHost <
>>> [email protected]> wrote:
>>>
>>> All 3 apps have the exact same import lines
>>>
>>> import re, os, sys, socket, time, datetime, random, smtplib, subprocess,
>>> httpagentparser, geoip2.database, pymysql
>>> from datetime import datetime, timedelta
>>> from flask import Flask, request, redirect, render_template, url_for,
>>> Response
>>>
>>> Στις Παρ, 7 Σεπ 2018 στις 2:43 μ.μ., ο/η Graham Dumpleton <
>>> [email protected]> έγραψε:
>>>
>>>> It is the 'import' statements you have which will be the issue.
>>>>
>>>> On 7 Sep 2018, at 9:40 pm, Νίκος @ SuperHost <
>>>> [email protected]> wrote:
>>>>
>>>> All 3 wsgi application have similar these 2 liens of code:
>>>>
>>>> application = Flask(__name__)
>>>> app = application
>>>>
>>>> but thats needed for the wsgi app to run. Is it because they have the
>>>> same name?
>>>> should i name them app1, app2, app3 ?
>>>>
>>>> Στις Παρ, 7 Σεπ 2018 στις 2:35 μ.μ., ο/η Graham Dumpleton <
>>>> [email protected]> έγραψε:
>>>>
>>>>> Based on that they should be in separate processes, so there must be
>>>>> something in your code which is importing 'app.py' module into your other
>>>>> application. You will need to work through your code, add debugging
>>>>> statements as necessary to log what it is doing and see if you can find 
>>>>> the
>>>>> issue. Turn hard for me to guess.
>>>>>
>>>>> On 7 Sep 2018, at 9:25 pm, Νίκος @ SuperHost <
>>>>> [email protected]> wrote:
>>>>>
>>>>> [root@superhost public_html]# tail -f ../logs/error_log
>>>>> [Fri Sep 07 14:25:15.877193 2018] [wsgi:info] [pid 15773] mod_wsgi 
>>>>> (pid=15773): Exiting process 'app'.
>>>>> [Fri Sep 07 14:25:16.026260 2018] [wsgi:info] [pid 15941] mod_wsgi 
>>>>> (pid=15941): Attach interpreter ''.
>>>>> [Fri Sep 07 14:25:16.057524 2018] [wsgi:info] [pid 15940] mod_wsgi 
>>>>> (pid=15940): Attach interpreter ''.
>>>>> [Fri Sep 07 14:25:16.060303 2018] [wsgi:info] [pid 15941] mod_wsgi 
>>>>> (pid=15941): Imported 'mod_wsgi'.
>>>>> [Fri Sep 07 14:25:16.060387 2018] [wsgi:info] [pid 15941] mod_wsgi 
>>>>> (pid=15941, process='clientele', application=''): Loading Python script 
>>>>> file '/home/nikos/public_html/clientele.py'.
>>>>> [Fri Sep 07 14:25:16.065764 2018] [wsgi:info] [pid 15942] mod_wsgi 
>>>>> (pid=15942): Attach interpreter ''.
>>>>> [Fri Sep 07 14:25:16.109641 2018] [wsgi:info] [pid 15940] mod_wsgi 
>>>>> (pid=15940): Imported 'mod_wsgi'.
>>>>> [Fri Sep 07 14:25:16.109731 2018] [wsgi:info] [pid 15940] mod_wsgi 
>>>>> (pid=15940, process='downloads', application=''): Loading Python script 
>>>>> file '/home/nikos/public_html/downloads.py'.
>>>>> [Fri Sep 07 14:25:16.117103 2018] [wsgi:info] [pid 15942] mod_wsgi 
>>>>> (pid=15942): Imported 'mod_wsgi'.
>>>>> [Fri Sep 07 14:25:16.117195 2018] [wsgi:info] [pid 15942] mod_wsgi 
>>>>> (pid=15942, process='app', application=''): Loading Python script file 
>>>>> '/home/nikos/public_html/app.py'.
>>>>>
>>>>>
>>>>> Στις Παρ, 7 Σεπ 2018 στις 1:22 μ.μ., ο/η Graham Dumpleton <
>>>>> [email protected]> έγραψε:
>>>>>
>>>>>> Set:
>>>>>>
>>>>>>     LogLevel info
>>>>>>
>>>>>> in your Apache VirtualHost so can see in logs what daemon process
>>>>>> group and interpreter context the scripts are loaded.
>>>>>>
>>>>>> And make sure you did restart Apache.
>>>>>>
>>>>>> Graham
>>>>>>
>>>>>> On 7 Sep 2018, at 7:30 pm, Νίκος @ SuperHost <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>> Okey i have written it back as per your suggestion and with the home
>>>>>> directive:
>>>>>>
>>>>>>
>>>>>> <Directory /home/nikos/public_html>
>>>>>>     AllowOverride None
>>>>>>     Require all granted
>>>>>> </Directory>
>>>>>>
>>>>>> WSGIDaemonProcess downloads user=nikos group=nikos threads=5
>>>>>> home=/home/nikos/public_html
>>>>>> WSGIScriptAlias /downloads /home/nikos/public_html/downloads.py
>>>>>> process-group=downloads application-group=%{GLOBAL}
>>>>>>
>>>>>> WSGIDaemonProcess clientele user=nikos group=nikos threads=5
>>>>>> home=/home/nikos/public_html
>>>>>> WSGIScriptAlias /clientele /home/nikos/public_html/clientele.py
>>>>>> process-group=clientele application-group=%{GLOBAL}
>>>>>>
>>>>>> WSGIDaemonProcess app user=nikos group=nikos threads=5
>>>>>> home=/home/nikos/public_html
>>>>>>
>>>>>>
>>>>>> Still the same error message:
>>>>>>
>>>>>>
>>>>>> [Fri Sep 07 12:28:45.567259 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980] [2018-09-07 12:28:45,565] ERROR in app: Exception 
>>>>>> on /clientele.py [GET]
>>>>>> [Fri Sep 07 12:28:45.567313 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980] Traceback (most recent call last):
>>>>>> [Fri Sep 07 12:28:45.567317 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]   File 
>>>>>> "/usr/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
>>>>>> [Fri Sep 07 12:28:45.567320 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]     response = self.full_dispatch_request()
>>>>>> [Fri Sep 07 12:28:45.567324 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]   File 
>>>>>> "/usr/lib/python3.6/site-packages/flask/app.py", line 1815, in 
>>>>>> full_dispatch_request
>>>>>> [Fri Sep 07 12:28:45.567327 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]     rv = self.handle_user_exception(e)
>>>>>> [Fri Sep 07 12:28:45.567330 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]   File 
>>>>>> "/usr/lib/python3.6/site-packages/flask/app.py", line 1718, in 
>>>>>> handle_user_exception
>>>>>> [Fri Sep 07 12:28:45.567335 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]     reraise(exc_type, exc_value, tb)
>>>>>> [Fri Sep 07 12:28:45.567339 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]   File 
>>>>>> "/usr/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
>>>>>> [Fri Sep 07 12:28:45.567344 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]     raise value
>>>>>> [Fri Sep 07 12:28:45.567349 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]   File 
>>>>>> "/usr/lib/python3.6/site-packages/flask/app.py", line 1813, in 
>>>>>> full_dispatch_request
>>>>>> [Fri Sep 07 12:28:45.567352 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]     rv = self.dispatch_request()
>>>>>> [Fri Sep 07 12:28:45.567355 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]   File 
>>>>>> "/usr/lib/python3.6/site-packages/flask/app.py", line 1799, in 
>>>>>> dispatch_request
>>>>>> [Fri Sep 07 12:28:45.567358 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]     return 
>>>>>> self.view_functions[rule.endpoint](**req.view_args)
>>>>>> [Fri Sep 07 12:28:45.567361 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]   File "/home/nikos/public_html/app.py", line 338, 
>>>>>> in index
>>>>>> [Fri Sep 07 12:28:45.567364 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980]     pagehit = cur.fetchone()[0]
>>>>>> [Fri Sep 07 12:28:45.567368 2018] [wsgi:error] [pid 11929] [remote 
>>>>>> 46.103.174.201:7980] TypeError: 'NoneType' object is not subscriptable
>>>>>>
>>>>>>
>>>>>> Στις Παρ, 7 Σεπ 2018 στις 12:20 μ.μ., ο/η Graham Dumpleton <
>>>>>> [email protected]> έγραψε:
>>>>>>
>>>>>>> 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] [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] Traceback (most recent call last):
>>>>>>> [Fri Sep 07 12:10:39.767437 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     response = self.full_dispatch_request()
>>>>>>> [Fri Sep 07 12:10:39.767453 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     rv = self.handle_user_exception(e)
>>>>>>> [Fri Sep 07 12:10:39.767458 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     reraise(exc_type, exc_value, tb)
>>>>>>> [Fri Sep 07 12:10:39.767463 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     raise value
>>>>>>> [Fri Sep 07 12:10:39.767469 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     rv = self.dispatch_request()
>>>>>>> [Fri Sep 07 12:10:39.767474 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     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]   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]     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]   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]     result = self._query(query)
>>>>>>> [Fri Sep 07 12:10:39.767489 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     conn.query(q)
>>>>>>> [Fri Sep 07 12:10:39.767494 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     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]   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]     raise err.InterfaceError("(0, '')")
>>>>>>> [Fri Sep 07 12:10:39.767509 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]
>>>>>>> [Fri Sep 07 12:10:40.216819 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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] Traceback (most recent call last):
>>>>>>> [Fri Sep 07 12:10:40.216883 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     response = self.full_dispatch_request()
>>>>>>> [Fri Sep 07 12:10:40.216895 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     rv = self.handle_user_exception(e)
>>>>>>> [Fri Sep 07 12:10:40.216927 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     reraise(exc_type, exc_value, tb)
>>>>>>> [Fri Sep 07 12:10:40.216938 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     raise value
>>>>>>> [Fri Sep 07 12:10:40.216949 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     rv = self.dispatch_request()
>>>>>>> [Fri Sep 07 12:10:40.216960 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     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]   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]     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 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]     result = self._query(query)
>>>>>>> [Fri Sep 07 12:10:40.216992 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     conn.query(q)
>>>>>>> [Fri Sep 07 12:10:40.217003 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]     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]   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]     raise err.InterfaceError("(0, '')")
>>>>>>> [Fri Sep 07 12:10:40.217027 2018] [wsgi:error] [pid 10994] [remote 
>>>>>>> 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]
>>>>>>>
>>>>>>>
>>>>>>> I dont understand why its tryign to load 'app/py' when i give 
>>>>>>> '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].
>>>>>>> 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 a topic in
>>>>>>> the Google Groups "modwsgi" group.
>>>>>>> To unsubscribe from this topic, visit
>>>>>>> https://groups.google.com/d/topic/modwsgi/4sM5QIitIyI/unsubscribe.
>>>>>>> To unsubscribe from this group and all its topics, 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 a topic in
>>>>>> the Google Groups "modwsgi" group.
>>>>>> To unsubscribe from this topic, visit
>>>>>> https://groups.google.com/d/topic/modwsgi/4sM5QIitIyI/unsubscribe.
>>>>>> To unsubscribe from this group and all its topics, 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 a topic in the
>>>>> Google Groups "modwsgi" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/modwsgi/4sM5QIitIyI/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, 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 a topic in the
>>>> Google Groups "modwsgi" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/modwsgi/4sM5QIitIyI/unsubscribe.
>>>> To unsubscribe from this group and all its topics, 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 a topic in the
>>> Google Groups "modwsgi" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/modwsgi/4sM5QIitIyI/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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 a topic in the
>> Google Groups "modwsgi" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/modwsgi/4sM5QIitIyI/unsubscribe.
>> To unsubscribe from this group and all its topics, 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 a topic in the
> Google Groups "modwsgi" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/modwsgi/4sM5QIitIyI/unsubscribe.
> To unsubscribe from this group and all its topics, 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.

Reply via email to