Youre right.  Just tested that pymysql can connect to db first off, and it 
works.  So the problem lies as you said in wsgi not finding the module or 
python3 path.  In the tutorial I believe hes using default python 2.7 so he 
doesnt need further configuration, because by default mod wsgi probably 
finds python2.7 path.  So I need to figure out how to get modwsgi to point 
to the right place, which Im not sure on.  When I installed it from source 
it installed --with-python3 option so Im not sure why it doesnt use that 
python as the default path. Heres my wsgi and vhost files anyways (and Ill 
do a little digging in the mean time.  Dont mean to be a bother, just this 
issue was very confusing as I thought the problem lay with pymysql, yet its 
modwsgi - damn thing got me stuck for a week - then I checked apache 
log...DERP.  Until this import issue my web app has been working perfectly):

/var/www/site1/FlaskApp$ cat flaskapp.wsgi 

import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/site1/FlaskApp/")

from FlaskApp import app as application
application.secret_key = '
a7j3sk29dk6gh4n69x0n70nn81mps'


kien1@kien1pv:/etc/apache2/sites-enabled$ cat site1.conf 

<VirtualHost *:80>
                ServerName 192.168.1.105
                ServerAlias site1.me
                ServerAdmin [email protected]

                WSGIScriptAlias / /var/www/site1/FlaskApp/flaskapp.wsgi
                <Directory /var/www/site1/FlaskApp/FlaskApp/>
                        Order allow,deny
                        Allow from all
                </Directory>
                Alias /static /var/www/site1/FlaskApp/FlaskApp/static
                <Directory /var/www/site1/FlaskApp/FlaskApp/static/>
                        Order allow,deny
                        Allow from all
                </Directory>
                ErrorLog /var/www/site1/logs/error.log
                LogLevel warn
                CustomLog /var/www/site1/logs/access.log combined
</VirtualHost>

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