Skip to content

Commit

Permalink
Changed my section titles from H1 to H2
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Beaudoin committed Feb 19, 2015
1 parent bca37c9 commit 3487f2c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions en/_posts/2015-02-14-how-to-run-bottle-uwsgi-nginx.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ author: thoorium
This setup will make use of _uWSGI_ as the application server because the built-in Bottle web server is __very slow__ and should only be used for __development__. _uWSGI_ is capable of spawning new process of you application and will scale your application when needed.

1. Installing Python, Bottle, uWSGI and Nginx
===============================
-------

In this guide we will be using _Debian Wheezy_ as our host OS. Getting everything installed is easy thanks to the wonderful package manager.

Expand All @@ -25,7 +25,7 @@ sudo apt-get install python2.7 python-pip uwsgi uwsgi-plugin-python nginx
This will install Python, pip (Python package manager), uWSGI, the uWSGI Python plugin and Nginx. _uWSGI_ does not know how to handle Python applications by default and requires the Python plugin in order to function for our needs.

2. Hello Runabove
===============
-------

For this example we will create a basic _Hello Runabove_ bottle application that goes like this:

Expand Down Expand Up @@ -57,7 +57,7 @@ This application will return a simple "Hello Runabove!" when visited from the we
You can clone the full _Hello Runabove_ at the following address: [https://github.com/Thoorium/hello-runabove](https://github.com/Thoorium/hello-runabove)

3. Setting up Bottle and the virtual environment
===============
-------

A good practice with Python is to contain all project's dependencies in a "virtualenv". A virtualenv is lightweight space where a project can have its own dependencies without interfering with system wide python packages. As a second benefit, you won't need to be root anymore to install from __pip__.

Expand All @@ -80,7 +80,7 @@ sudo venv-bottle/bin/pip install bottle
This will create a directory will all the dependencies your python application need to run. By doing so you will prevent any sort of conflicts between python applications if different versions of the same package are used!

4. Configure uWSGI
===========
-------

In order to get _uWSGI_ to run your bottle application, you will first need to create a configuration file for your application. The configuration file is stored in ``apps-available`` and must be copied over to ``apps-enabled`` to work. Both directories are located under ``/etc/uwsgi/``.

Expand Down Expand Up @@ -121,7 +121,7 @@ sudo service uwsgi start
You can read more about _uWSGI_ configuration at [https://uwsgi-docs.readthedocs.org/en/latest/Configuration.html](https://uwsgi-docs.readthedocs.org/en/latest/Configuration.html)

5. Configure Nginx
===========
-------

Now that _uWSGI_ is running and created a socket for us to use, let's configure _Nginx_ to listen to this socket.

Expand Down Expand Up @@ -167,12 +167,12 @@ sudo service nginx start
```

6. Test it
===========
-------

Congratulations! Your bottle application is now running live. Navigate to the address you have configured during step 4 and see it by yourself.

Troubleshooting
===========
-------

If you are having trouble installing the packages via ``apt-get``, you might need to update your package list. Do so using the following command:

Expand Down

0 comments on commit 3487f2c

Please sign in to comment.