Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add in "Install guide" describing about nginx with uWSGI #139

Open
freem4n opened this Issue · 2 comments

3 participants

@freem4n

Add to http://webpy.org/install describing about nginx with uWSGI

Nginx config:

server {
  # Change this if you want to serve your application on another port
  listen 80;

  # Replace this with your domain name
  server_name apps.example.com;

  # You can use virtual directory like '/apps/' here, but remember that
  # you should matching 'urls' defined in your web.py application file
  location / {
    include uwsgi_params;

    # This should match the 'socket' entry of your uwsgi.xml
    uwsgi_pass 127.0.0.1:9090;

    # This is the absolute path to the folder containing your application
    uwsgi_param UWSGI_CHDIR /var/www/apps;

    # This is actually not necessary for our simple application,
    # but you may need this in future
    uwsgi_param UWSGI_PYHOME /var/www/apps;

    # This is the name of your application file, minus the '.py' extension
    uwsgi_param UWSGI_SCRIPT index;
  }
}

And add this line to the end of application .py file:

application = app.wsgifunc()
@oscarfroberg

I believe that snippet is from:

http://fartersoft.com/blog/2012/02/10/deployment-of-web-py-applications-using-uwsgi-and-nginx-on-ubuntu/

That link has more good information for deploying on Ubuntu.

@AndyHelix

thx i will see if it works on my site

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.