title: Flask doesn't see environment variables
body: <p>I connected apache with my Flask App with WSGI with virtualenv.I have a couple configuration variables(secret key and database URI), so I'm using </p>
  
  <pre><code>app = Flask(__name__)
  app.config.from_envvar('CONFIG_FILE_FLASK')
  </code></pre>
  
  <p>The error in apache errorlog is:</p>
  
  <blockquote>
    <p>RuntimeError: The environment variable 'CONFIG_FILE_FLASK' is not set and as such configuration could not be loaded.  Set this variable and make it point to a configuration file</p>
  </blockquote>
  
  <p>This variable exists (using command <strong>printenv</strong>) :</p>
  
  <pre><code>......
  UPSTART_INSTANCE=
  COLORTERM=truecolor
  CONFIG_FILE_FLASK=/var/flaskconf/config.cfg
  
  SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
  XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/oleg
  USER=oleg
  ......
  </code></pre>
  
  <p><strong>/var/flaskconf/config.cfg</strong> itself is :</p>
  
  <pre><code>SECRET_KEY = 'thisissupposedtobesecret'
  SQLALCHEMY_DATABASE_URI = 'mysql://user:password@localhost/Table'
  </code></pre>
  
  <p>It also doesn't work if I do this: </p>
  
  <pre><code>sudo python __init__.py 
  </code></pre>
  
  <p><strong>BUT</strong>, if without sudo it works!(maybe it'll be a clue)</p>
  
  <p>Thank you so much in advance.
  Ready to provide any file immediately. </p>
  
  <p><strong>UPDATE 1</strong>
  I also noticed that variable FLASK_APP also "invisible"</p>
  
  <pre><code>oleg@test:/var/www/app/app$ export FLASK_APP=app.py
  oleg@test:/var/www/app/app$ flask run
  Usage: flask run [OPTIONS]
  
  Error: The file/path provided (app) does not appear to exist.  Please verify the path is correct.  If app is not on PYTHONPATH, ensure the extension is .py
  oleg@test:/var/www/app/app$ 
  </code></pre>
  
  <p>Any ideas about that?</p>
  
  <p>EDIT:
  <strong>File structure:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/ortvy.png" alt=""></p>