Home  >  Q&A  >  body text

nginx - How to configure flask to read the secondary directory? ?

uwsgi nginx flask deployed python script successfully. But it can only read the website directory /www. How to read, for example, the /www/data directory. .

某草草某草草2714 days ago447

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-16 17:12:25

    I don’t know why, who reads it? nginx or flask? For static files, if you read them through nginx, just configure one more location. If the static file wants to be read through flask, it must be placed under static, or the file must be read through the absolute path through the dynamic request background, and then the file content must be returned.

    reply
    0
  • Cancelreply