Skip to content

Instantly share code, notes, and snippets.

@CMGS
Created December 26, 2014 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CMGS/b56b7d3f121cc3be7045 to your computer and use it in GitHub Desktop.
Save CMGS/b56b7d3f121cc3be7045 to your computer and use it in GitHub Desktop.
nginx conf
user root;
worker_processes 8;
daemon off;
error_log /root/error.log;
pid /root/nginx.pid;
events {
worker_connections 102400;
multi_accept on;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
keepalive_requests 100000;
reset_timedout_connection on;
gzip on;
upstream up{
server 127.0.0.1:9991;
}
server {
listen 10080;
server_name 10.1.201.16;
location ~ ^/ {
proxy_pass http://up;
}
}
}
@CMGS
Copy link
Author

CMGS commented Dec 26, 2014

#!/usr/bin/python

from gevent.pywsgi import WSGIServer


def application(env, start_response):
    start_response('200 OK', [('Content-Type', 'text/html')])
    return "hw"

if __name__ == '__main__':
    WSGIServer(('', 9991), application, 10240, log=None).serve_forever()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment