-
Notifications
You must be signed in to change notification settings - Fork 889
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
Issue #2656 #2853
Issue #2656 #2853
Changes from 4 commits
07e802f
3588e81
fb17a37
7c77796
3c5731a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -288,3 +288,5 @@ Contributors | |
- Moriyoshi Koizumi, 2016/11/20 | ||
|
||
- Mikko Ohtamaa, 2016/12/6 | ||
|
||
- Martin Frlin, 2016/12/7 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -290,21 +290,22 @@ Here's sample output from a run of ``pserve`` on UNIX: | |
|
||
$ $VENV/bin/pserve development.ini | ||
Starting server in PID 16208. | ||
serving on http://127.0.0.1:6543 | ||
Serving on http://127.0.0.1:6543 | ||
Serving on http://[::1]:6543 | ||
|
||
|
||
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 | ||
example: | ||
``development.ini`` file, and replace the ``listen`` value in the | ||
``[server:main]`` section, changing it from ``127.0.0.1:6543 [::1]:6543`` to ``*:6543`` | ||
(this is equivalent to ``0.0.0.0:6543 [::]:6543``). For example: | ||
|
||
.. code-block:: ini | ||
|
||
[server:main] | ||
use = egg:waitress#main | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *: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 | ||
|
@@ -316,12 +317,13 @@ the case, if you use a browser running on the same system as Pyramid, it will | |
be able to access the application via ``http://127.0.0.1:6543/`` as well as via | ||
``http://192.168.1.50:6543/``. However, *other people* on other computers on | ||
the same network will also be able to visit your Pyramid application in their | ||
browser by visiting ``http://192.168.1.50:6543/``. | ||
browser by visiting ``http://192.168.1.50:6543/``. Same holds true if you use | ||
ipv6. ``[::]`` means the same as ``0.0.0.0`` but for ipv6 protocol. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More minor grammar fixes. IPv6. |
||
|
||
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 [::1]:6543`` line in the ``development.ini`` file's ``[server:main]`` | ||
section to ``listen = 127:0.0.1:8080 [::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). | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,8 @@ you'll see something much like this show up on the console: | |
|
||
$ $VENV/bin/pserve development.ini | ||
Starting server in PID 16305. | ||
serving on http://127.0.0.1:6543 | ||
Serving on http://127.0.0.1:6543 | ||
Serving on http://[::1]:6543 | ||
|
||
This chapter explains what happens between the time you press the "Return" key | ||
on your keyboard after typing ``pserve development.ini`` and the time the line | ||
|
@@ -130,8 +131,9 @@ 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 [::1]:6543``, means that it will listen on ipv4 and ipv6), | ||
on port number 6543. The server code itself | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor grammar fixes. Also you no longer need to hard wrap paragraphs. and it will listen on all interfaces on port 6543 for both IPv4 and IPv6 ( |
||
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. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,4 @@ tutorial.secret = 98zd | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,4 @@ tutorial.secret = 98zd | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,4 @@ use = egg:tutorial | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,4 @@ pyramid.includes = | |
|
||
[server:main] | ||
use = egg:pyramid#wsgiref | ||
host = 0.0.0.0 | ||
port = 6543 | ||
listen = *:6543 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor grammar fix.
The same holds