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

0.0.0.0:8000 doesn't work in web browsers without being more explicit #2617

Closed
chicks-net opened this issue Nov 27, 2018 · 2 comments
Closed
Labels
status: accepted This issue has been accepted for implementation type: documentation A change or addition to the documentation

Comments

@chicks-net
Copy link

Change Type

[ ] Addition
[X] Correction
[ ] Deprecation
[ ] Cleanup (formatting, typos, etc.)

Proposed Changes

In python3 manage.py runserver 0.0.0.0:8000 --insecure wouldn't it be easier if we specified port 80? I realize this means you need to be running as root, but most of the install process requires root anyway. When I initially read the docs I thought this was going to 0.0.0.0:0000 (all zeros) and I didn't notice while cut and pasting it. So when I got connection refused I thought I had done something wrong.

Alternatively the docs could specify that you need to go to IP:8000 in the browser instead of

if we navigate to the name or IP of the server (as defined in ALLOWED_HOSTS) we should be greeted with the NetBox home page

which doesn't imply needing to go to any specific port.

@jeremystretch
Copy link
Member

Don't run runserver as root. From the Django docs:

DO NOT USE THIS SERVER IN A PRODUCTION SETTING. It has not gone through security audits or performance tests.

Port 8000 is the default for the service. We're specifying 0.0.0.0:8000 here simply to make it accessible via any IP (not just the loopback) since it's likely not being installed on the local machine.

I'll add a note to the docs to make it more obvious that the service is running on port 8000.

@jeremystretch jeremystretch added type: documentation A change or addition to the documentation status: accepted This issue has been accepted for implementation labels Nov 28, 2018
@chicks-net
Copy link
Author

Your docs made it perfectly clear that it wasn't ready for production at this stage in the process. I just discovered this while trying to test it.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: documentation A change or addition to the documentation
Projects
None yet
Development

No branches or pull requests

2 participants