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

Make the server listen to outside of localhost #2

Closed
raamee opened this issue Sep 11, 2015 · 3 comments
Closed

Make the server listen to outside of localhost #2

raamee opened this issue Sep 11, 2015 · 3 comments

Comments

@raamee
Copy link

raamee commented Sep 11, 2015

Hey,

Recently came to know your tool. A very sincere work from your side. Congrats!

I'm trying to set it up in my system (centos 6.5 64 bit). I have started the development server:

System check identified no issues (0 silenced).
September 11, 2015 - 16:24:15
Django version 1.8.2, using settings 'hc.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

How to make it listen to server's public IP address instead of localhost?

Thank you.

@cuu508
Copy link
Member

cuu508 commented Sep 11, 2015

Hi raamee,

You can look up startup options for Django development server like this:

$ ./manage.py runserver --help

The parameter you're looking for is [addrport]. Start it like this:

$ ./manage.py runserver 192.168.1.123:8000
Performing system checks...

System check identified no issues (0 silenced).
September 11, 2015 - 16:33:01
Django version 1.8.2, using settings 'hc.settings'
Starting development server at http://192.168.1.123:8000/
Quit the server with CONTROL-C.

Note that development server should indeed only be used for development/testing. For production, you would ideally run it using gunicorn or uwsgi, and serve static files with something like nginx.
On deployment side, I don't think there any specific gotchas, you can follow guides for deploying any regular Django app.
Please let me know how you get on!

@raamee
Copy link
Author

raamee commented Sep 12, 2015

Hi,

Great! Thank you for the reply. I got it working! I'm new to Django apps, so I'm kinda slow in setting up. I'm gonna start setting checks. Will let you know if I face any challenges.

@raamee raamee closed this as completed Sep 14, 2015
@yad2nus
Copy link

yad2nus commented Mar 11, 2020

so good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants