Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed 'host' and 'port' configuration to a new 'listen' style that … #2847

Merged
merged 5 commits into from
Dec 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ Features

See https://github.com/Pylons/pyramid/pull/2805

- Scaffolds, documentation and tutorials now use ``listen`` option instead
of ``host`` and ``port`` to configure Waitress server.

Bug Fixes
---------

Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,5 @@ Contributors
- Moriyoshi Koizumi, 2016/11/20

- Mikko Ohtamaa, 2016/12/6

- Martin Frlin, 2016/12/6
3 changes: 1 addition & 2 deletions docs/narr/MyProject/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ pyramid.includes =

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 6543
listen = 127.0.0.1:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/narr/MyProject/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ pyramid.default_locale_name = en

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
11 changes: 5 additions & 6 deletions docs/narr/project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,15 @@ Here's sample output from a run of ``pserve`` on UNIX:
Access is restricted such that only a browser running on the same machine as
Pyramid will be able to access your Pyramid application. However, if you want
to open access to other machines on the same network, then edit the
``development.ini`` file, and replace the ``host`` value in the
``[server:main]`` section, changing it from ``127.0.0.1`` to ``0.0.0.0``. For
``development.ini`` file, and replace the ``listen`` value in the
``[server:main]`` section, changing it from ``127.0.0.1:6543`` to ``0.0.0.0:6543``. For
example:

.. code-block:: ini

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

Now when you use ``pserve`` to start the application, it will respond to
requests on *all* IP addresses possessed by your system, not just requests to
Expand All @@ -320,8 +319,8 @@ browser by visiting ``http://192.168.1.50:6543/``.

You can change the port on which the server runs on by changing the same
portion of the ``development.ini`` file. For example, you can change the
``port = 6543`` line in the ``development.ini`` file's ``[server:main]``
section to ``port = 8080`` to run the server on port 8080 instead of port 6543.
``listen = 127.0.0.1:6543`` line in the ``development.ini`` file's ``[server:main]``
section to ``listen = 127:0.0.1:8080`` to run the server on port 8080 instead of port 6543.

You can shut down a server started this way by pressing ``Ctrl-C`` (or
``Ctrl-Break`` on Windows).
Expand Down
4 changes: 2 additions & 2 deletions docs/narr/startup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ Here's a high-level time-ordered overview of what happens when you press

#. ``pserve`` starts the WSGI *server* defined within the ``[server:main]``
section. In our case, this is the Waitress server (``use =
egg:waitress#main``), and it will listen on all interfaces (``host =
127.0.0.1``), on port number 6543 (``port = 6543``). The server code itself
egg:waitress#main``), and it will listen on all interfaces (``listen =
127.0.0.1:6543``), on port number 6543. The server code itself
is what prints ``serving on http://127.0.0.1:6543``. The server serves the
application, and the application is running, waiting to receive requests.

Expand Down
3 changes: 1 addition & 2 deletions docs/quick_tour/package/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ pyramid.includes =

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 6543
listen = 127.0.0.1:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/quick_tour/sqla_demo/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ sqlalchemy.url = sqlite:///%(here)s/sqla_demo.sqlite

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 6543
listen = 127.0.0.1:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/quick_tour/sqla_demo/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ sqlalchemy.url = sqlite:///%(here)s/sqla_demo.sqlite

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/quick_tutorial/authentication/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ tutorial.secret = 98zd

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/authorization/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ tutorial.secret = 98zd

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/databases/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ sqlalchemy.url = sqlite:///%(here)s/sqltutorial.sqlite

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

# Begin logging configuration

Expand Down
3 changes: 1 addition & 2 deletions docs/quick_tutorial/debugtoolbar/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/forms/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/functional_testing/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/ini/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ use = egg:tutorial

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/jinja2/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/json/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/logging/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

# Begin logging configuration

Expand Down
3 changes: 1 addition & 2 deletions docs/quick_tutorial/more_view_classes/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/request_response/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/retail_forms/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/routing/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/scaffolds/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ pyramid.includes =

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/quick_tutorial/scaffolds/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ pyramid.default_locale_name = en

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/quick_tutorial/sessions/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/static_assets/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/templating/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/unit_testing/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/view_classes/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/quick_tutorial/views/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ pyramid.includes =

[server:main]
use = egg:pyramid#wsgiref
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/authorization/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 6543
listen = 127.0.0.1:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/authorization/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/basiclayout/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 6543
listen = 127.0.0.1:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/basiclayout/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/installation/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 6543
listen = 127.0.0.1:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/installation/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/models/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 6543
listen = 127.0.0.1:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/models/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/tests/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 6543
listen = 127.0.0.1:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/tests/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/views/development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 6543
listen = 127.0.0.1:6543

###
# logging configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/wiki/src/views/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
listen = 0.0.0.0:6543

###
# logging configuration
Expand Down
Loading