Comments (5)
I looked into the code, and I found no configuration for opening a listening socket. From this, I gather that this is built purely for use with apache. There is no possible way to use this with Nginx.
from flipflop.
Yup; I abandoned this fork in favour of https://github.com/chxanders/flup3 or another straight port of Flup to Python 3.
from flipflop.
It works fine on Nginx. This is what I'm using:
In /etc/hosts
127.0.0.1 yourwebsite.localhost
In /etc/nginx/sites-available/yourwebsite.localhost
(note, this is not the complete file! just the flipflop specific bit)
location / {
location ~ \.pyc$ {
access_log off;
log_not_found off;
deny all;
}
try_files $uri $uri/ /index.py?q=$uri&$args;
}
location ~ \.py$ {
expires off;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9002;
}
To start:
cwd=`pwd`
spawn-fcgi -d "${cwd}" -a 127.0.0.1 -p 9002 "${cwd}/index.py"
sudo service nginx start
To stop:
sudo service nginx stop
cwd=`pwd`
kill `pgrep -f "python3 ${cwd}/index.py"`
from flipflop.
That it requires an external, third-party tool to construct magic environment variables to make it work is unfortunate. Please, please, please expose explicit configuration within the Python API, as Flup previously did.
from flipflop.
@golightlyb You mean It works fine on _INSERT_FAVOURITE_FCGI_CONTAINER_HERE_.
, not that it works fine on nginx
. It needs a container.
from flipflop.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flipflop.