Code Monkey home page Code Monkey logo

Comments (5)

samveen avatar samveen commented on September 26, 2024

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.

amcgregor avatar amcgregor commented on September 26, 2024

Yup; I abandoned this fork in favour of https://github.com/chxanders/flup3 or another straight port of Flup to Python 3.

from flipflop.

golightlyb avatar golightlyb commented on September 26, 2024

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.

amcgregor avatar amcgregor commented on September 26, 2024

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.

samveen avatar samveen commented on September 26, 2024

@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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.