简体   繁体   中英

Running a Python script with nginx

I want to run a python script whenever there is a request to nginx. Is there any way I could run python through my nginx conf or If I could add my python script in nginx configuration?

NGINX has support for JavaScript and LUA via modules.

JavaScript in NGINX OpenResty LUA

You could use for example the framework Flask and using WSGI within NGINX to front the python application.

Python Flask

You don't really describe your use-case enough to provide a more specific answer than this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM