简体   繁体   中英

Django - Host a website on a Lan Network

I've been working on a website for the past month, and now its time for me to host the django website onto a private server. Is there a detailed method on how I'm supposed to host the website onto a specific IP address assigned to my system? This is my first time dealing with hosting a server and i dont know much about it. Also, once i host it, How do i change the link from being the IP address to an actual link like "12345678.com" or something like that?

(The website should be hosted in such a way that only the people who are in the same network/lan connection should have access to the website.)

I have wamp on the system and the system has a Windows Server OS (if this info helps)

you can run your codes with manage command like this

python manage.py runserver 0.0.0.0:8000

but its strongly recommended to run your code with a web server like nginx or apache read this tutorial to run your site on a linux server

https://www.digitalocean.com/community/tutorials/how-to-set-up-uwsgi-and-nginx-to-serve-python-apps-on-ubuntu-14-04

on windows you can use IIS but its not recommended. its performance is not good

to use 1234567890.com instead of using server ip address you must setup a DNS server on your local network. in linux you can use bind and windows server have its own DNS server. but in your DHCP configuration you must set this DNS server as clients DNS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM