user1998981
user1998981

Reputation: 705

Visit webpage hosted on ubuntu server in a local network

I have a ubuntu server hosting a web page driven by Python Django, I can access that page by using the following command:elinks http:// 127.0.0.1:8000.

Now if I want to access that same web page on a macbook sharing the same home router with my ubuntu server(local ip: 10.0.0.9), how would I do it? Typing in elinks http:// 10.0.0.9:8000 wouldn't work.

Thanks a lot, ZZ

Upvotes: 0

Views: 496

Answers (2)

Lysergia25
Lysergia25

Reputation: 144

Are you running the development server using manage.py?

If so, you should start the server using:

python manage.py runserver 0.0.0.0:8000

This will allow the development server to be visited by ips on all interfaces instead of just localhost.

Upvotes: 1

Garry Cairns
Garry Cairns

Reputation: 3125

You need to serve it. There are a number of ways to do this, but my preferred method is to use Nginx as a reverse proxy server for gunicorn. This is a good tutorial for that.

Upvotes: 0

Related Questions