Micolithe
Agender
36 years old
Philadelphia, PA
Online Now
Last Login: 08/30/2007

Agender Enby, Trans, Gay, AND the bearer of the gamer's curse. Not a man, not a woman, but instead I am puppy.
I got a fat ass and big ears.

--

Yes I did the cooking mama Let's Play way back when. I post alot about Tech (mostly how it sucks) and Cooking and Music and Television Shows and the occasional Let's Play video
💖@FadeToZac

--

We all do what we can ♫

So we can do just one more thing ♫

We can all be free ♫

Maybe not in words ♫

Maybe not with a look ♫

But with your mind ♫


last.fm listening



micolithe
@micolithe

i almost got nginx and flask to talk to eachother but they're tripping over permissions issues on a socket file :/

in retrospect i think installing conda to my home directory was a mistake.


micolithe
@micolithe
  • The digitalocean article is TERRIBLE. It glosses over alot of things and tries to get you to run all this out of your home directory, do not do that. Nearly every person I found on stackoverflow dealing with 502 bad gateway errors in this kind of setup was trying to follow this exact tutorial.
  • Install Conda somewhere outside of your home directory and run chgrp -R www-data /tools/conda
  • The python files that serve Flask should also be outside your home directory, like /tools/flask
  • The service file needs --env SCRIPT_NAME=api/ in order to have gunicorn run your python code in a subdirectory.
  • The nginx config file in sites-available also needs to be pointed at the flask.sock socket file the same way, with a location of api/, with some proxy pass options included. I do not know if the extra options helped, because I added them at the same times as SCRIPT_NAME=api/ so I guess when I do it for real I can check and if they're really needed I'll add them.

You must log in to comment.

in reply to @micolithe's post: