Reverse proxy: Difference between revisions
Brian Wilson (talk | contribs) mNo edit summary |
Brian Wilson (talk | contribs) m →uWSGI |
||
Line 3: | Line 3: | ||
uWSGI lets me deploy flask applications without having to run the built in server. | uWSGI lets me deploy flask applications without having to run the built in server. | ||
This page helped me: | |||
http://markjberger.com/flask-with-virtualenv-uwsgi-nginx/ | http://markjberger.com/flask-with-virtualenv-uwsgi-nginx/ | ||
and | |||
and this: | |||
http://uwsgi-docs.readthedocs.io | |||
apt-get install uwsgi uwsgi-plugin-python | apt-get install uwsgi uwsgi-plugin-python | ||
Line 13: | Line 15: | ||
source venv/bin/activate | source venv/bin/activate | ||
pip install uwsgi | pip install uwsgi | ||
uwsgi - | |||
You can run from command line to test it | |||
uwsgi -s 192.168.1.2:5001 --protocol=http --wsgi-file /var/lib/twilio-weatherman/pyweatherman/wsgi.py | |||
and this should work: http://192.168.1.2:5001/home/ | |||
Right now I only need to deploy a single app, | |||
so I just hacked a shell script and set it to run at boot. | |||
/var/lib/twilio-weatherman/pyweatherman/uwsgi.sh | |||
I changed nginx to work with it. | |||
== Building Nginx for Owncloud and Windows == | == Building Nginx for Owncloud and Windows == |
Revision as of 23:31, 19 June 2017
uWSGI
uWSGI lets me deploy flask applications without having to run the built in server.
This page helped me: http://markjberger.com/flask-with-virtualenv-uwsgi-nginx/
and this: http://uwsgi-docs.readthedocs.io
apt-get install uwsgi uwsgi-plugin-python
In the virtualenv environment install uwsgi
source venv/bin/activate pip install uwsgi
You can run from command line to test it
uwsgi -s 192.168.1.2:5001 --protocol=http --wsgi-file /var/lib/twilio-weatherman/pyweatherman/wsgi.py
and this should work: http://192.168.1.2:5001/home/
Right now I only need to deploy a single app, so I just hacked a shell script and set it to run at boot.
/var/lib/twilio-weatherman/pyweatherman/uwsgi.sh
I changed nginx to work with it.
Building Nginx for Owncloud and Windows
The reason is to get digest authentication, so that I can use Windows 7 as a WebDAV client.
So far this is a FAIL.
- I cannot convince Windows to store a self-signed certificate.
- I can't get digest authentication to work with owncloud.
If I did succeed then I would need a Docker container so that I can load it in the Synology server.
Windows is a pain.
and https://www.nginx.com/resources/wiki/modules/auth_digest/
git clone https://github.com/samizdatco/nginx-http-auth-digest.git cd nginx-1* ./configure --add-module=../nginx-http-auth-digest/ --with-http_ssl_module --with-cc-opt=-Wno-error make sudo make install