diff options
| author | Dariusz Górecki <darek.krk@gmail.com> | 2016-07-15 17:21:44 +0100 |
|---|---|---|
| committer | Dariusz Górecki <darek.krk@gmail.com> | 2016-07-15 17:21:44 +0100 |
| commit | d54e0ae42b0289df89b5b73722d5c11d0f13a8ba (patch) | |
| tree | ef4aaf5781ccdc22323476ec5407dc4112b33d7e /docs/tutorials/modwsgi | |
| parent | 744bf0565a15a40f5c04cc8b0c1fe84a2ca489da (diff) | |
| parent | 37d124e64268be3a1fb82bed78c6c45eeee52140 (diff) | |
| download | pyramid-d54e0ae42b0289df89b5b73722d5c11d0f13a8ba.tar.gz pyramid-d54e0ae42b0289df89b5b73722d5c11d0f13a8ba.tar.bz2 pyramid-d54e0ae42b0289df89b5b73722d5c11d0f13a8ba.zip | |
Merge upstream master
Diffstat (limited to 'docs/tutorials/modwsgi')
| -rw-r--r-- | docs/tutorials/modwsgi/index.rst | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/docs/tutorials/modwsgi/index.rst b/docs/tutorials/modwsgi/index.rst index ddd968927..c66786b11 100644 --- a/docs/tutorials/modwsgi/index.rst +++ b/docs/tutorials/modwsgi/index.rst @@ -1,7 +1,7 @@ .. _modwsgi_tutorial: Running a :app:`Pyramid` Application under ``mod_wsgi`` -========================================================== +======================================================= :term:`mod_wsgi` is an Apache module developed by Graham Dumpleton. It allows :term:`WSGI` programs to be served using the Apache web @@ -18,27 +18,21 @@ specific path information for commands and files. ``mod_wsgi``. If you have experience with :app:`Pyramid` and ``mod_wsgi`` on Windows systems, please help us document this experience by submitting documentation to the `Pylons-devel maillist - <http://groups.google.com/group/pylons-devel>`_. + <https://groups.google.com/forum/#!forum/pylons-devel>`_. #. The tutorial assumes you have Apache already installed on your system. If you do not, install Apache 2.X for your platform in whatever manner makes sense. +#. It is also assumed that you have satisfied the + :ref:`requirements-for-installing-packages`. + #. Once you have Apache installed, install ``mod_wsgi``. Use the (excellent) `installation instructions - <http://code.google.com/p/modwsgi/wiki/InstallationInstructions>`_ + <https://code.google.com/archive/p/modwsgi/wikis/InstallationInstructions.wiki>`_ for your platform into your system's Apache installation. -#. Install :term:`virtualenv` into the Python which mod_wsgi will - run using the ``easy_install`` program. - - .. code-block:: text - - $ sudo /usr/bin/easy_install-2.6 virtualenv - - This command may need to be performed as the root user. - -#. Create a :term:`virtualenv` which we'll use to install our +#. Create a :term:`virtual environment` which we'll use to install our application. .. code-block:: text @@ -46,15 +40,15 @@ specific path information for commands and files. $ cd ~ $ mkdir modwsgi $ cd modwsgi - $ /usr/local/bin/virtualenv env + $ python3 -m venv env -#. Install :app:`Pyramid` into the newly created virtualenv: +#. Install :app:`Pyramid` into the newly created virtual environment: - .. code-block:: text + .. parsed-literal:: $ cd ~/modwsgi/env - $ $VENV/bin/easy_install pyramid - + $ $VENV/bin/pip install "pyramid==\ |release|\ " + #. Create and install your :app:`Pyramid` application. For the purposes of this tutorial, we'll just be using the ``pyramid_starter`` application as a baseline application. Substitute your existing :app:`Pyramid` @@ -65,9 +59,9 @@ specific path information for commands and files. $ cd ~/modwsgi/env $ $VENV/bin/pcreate -s starter myapp $ cd myapp - $ $VENV/bin/python setup.py install + $ $VENV/bin/pip install -e . -#. Within the virtualenv directory (``~/modwsgi/env``), create a +#. Within the virtual environment directory (``~/modwsgi/env``), create a script named ``pyramid.wsgi``. Give it these contents: .. code-block:: python @@ -107,7 +101,7 @@ specific path information for commands and files. WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On WSGIDaemonProcess pyramid user=chrism group=staff threads=4 \ - python-path=/Users/chrism/modwsgi/env/lib/python2.6/site-packages + python-path=/Users/chrism/modwsgi/env/lib/python2.7/site-packages WSGIScriptAlias /myapp /Users/chrism/modwsgi/env/pyramid.wsgi <Directory /Users/chrism/modwsgi/env> @@ -125,10 +119,8 @@ specific path information for commands and files. #. Visit ``http://localhost/myapp`` in a browser. You should see the sample application rendered in your browser. -:term:`mod_wsgi` has many knobs and a great variety of deployment -modes. This is just one representation of how you might use it to -serve up a :app:`Pyramid` application. See the `mod_wsgi -configuration documentation -<http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines>`_ for -more in-depth configuration information. - +:term:`mod_wsgi` has many knobs and a great variety of deployment modes. This +is just one representation of how you might use it to serve up a :app:`Pyramid` +application. See the `mod_wsgi configuration documentation +<https://code.google.com/archive/p/modwsgi/wikis/ConfigurationGuidelines.wiki>`_ +for more in-depth configuration information. |
