title: Mapping python flask website to a domain name
body: <p>I have a domain, domain_name.com. On my local machine, a website is made using python flask. In the home directory of the server for domain_name.com, I put all the files in a folder 'school' and in the python3 virtual environment execute the command <code>./main.py runserver</code>, which gives:</p>
  
  <p><code>* Serving Flask app "memorizer.application" (lazy loading)
   * Environment: production
     WARNING: This is a development server. Do not use it in a production deployment.
     Use a production WSGI server instead.
   * Debug mode: off
   * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)</code></p>
  
  <p>How do I map this to domain_name.com/school? The local machine is on ubuntu 18.04 and the server is linux millennium. I have access to the cpanel.</p>
  
  <p>Below is the sequence to run the script on the server:</p>
  
  <p><code>. cd school/</code></p>
  
  <p><code>. ls
  app.py     memorizer.db       Pipfile.lock  setup.cfg
  LICENSE    migrations         public        tests
  main.py    passenger_wsgi.py  questions     tmp
  memorizer  Pipfile            README.md     tox.ini</code></p>
  
  <p><code>. pwd
  /home/user_name/school</code></p>
  
  <p><code>. cat main.py</code></p>
  
  <p><code>#!/usr/bin/env python3
  from memorizer.application import manager
  if __name__ == '__main__':
      manager.run()</code></p>
  
  <p><code>. source /home/user_name/virtualenv/school/3.5/bin/activate</code></p>
  
  <p><code>(school:3.5). ./main.py runserver
   * Serving Flask app "memorizer.application" (lazy loading)
   * Environment: production
     WARNING: This is a development server. Do not use it in a production deployment.
     Use a production WSGI server instead.
   * Debug mode: off
   * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)</code></p>