Changes between Version 7 and Version 8 of UoL LAMP HowTo Install Python Flask Applications


Ignore:
Timestamp:
10/01/18 14:34:26 (6 years ago)
Author:
Richard Bramley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UoL LAMP HowTo Install Python Flask Applications

    v7 v8  
    145145}}}
    146146
    147 === Change Confirguration
     147=== Apache Setup
     148
     1491. Edit the Apache config:
     150
     151{{{
     152vi /local/apache2/etc/httpd.conf
     153}}}
     154
     1552. Amend the values below the comment `# List of resources to look for when the client requests a directory` to be:
     156
     157{{{
     158# List of resources to look for when the client requests a directory
     159DirectoryIndex index.html
     160
     161### 'Main' server configuration #############################################
     162<Directory /local/downloads>
     163    SetEnv FLASK_SECRET_KEY {{{Some Secret Key}}}
     164    SetEnv ENV1 env1_value
     165    SetEnv ENV2 env2_value
     166    SetEnv ENV3 env3_value
     167    WSGIProcessGroup application
     168    WSGIApplicationGroup %{GLOBAL}
     169    Order allow,deny
     170    Allow from all
     171</Directory>
     172
     173WSGIDaemonProcess application user=wwwrun threads=5 python-path=/local/venv/lib/python3.5/site-packages home={{{path to application folder}}}
     174WSGIScriptAlias / {{{path to application}}}
     175
     176}}}
     177
     178    Change the values of:
     179     - {{{Some Secret Key}}} to be somethin' secret
     180     - {{{path to application folder}}} to be the application folder
     181     - {{{path to application}}} to be the path to the actual application
     182
     183    And changing ENV1, 2 & 3 to be appropriate environment values.
    148184
    149185[[BackLinks]]