147 | | === Change Confirguration |
| 147 | === Apache Setup |
| 148 | |
| 149 | 1. Edit the Apache config: |
| 150 | |
| 151 | {{{ |
| 152 | vi /local/apache2/etc/httpd.conf |
| 153 | }}} |
| 154 | |
| 155 | 2. 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 |
| 159 | DirectoryIndex 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 | |
| 173 | WSGIDaemonProcess application user=wwwrun threads=5 python-path=/local/venv/lib/python3.5/site-packages home={{{path to application folder}}} |
| 174 | WSGIScriptAlias / {{{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. |