Deploying django in a production server

后端 未结 3 620
野趣味
野趣味 2021-02-04 03:51

First of all please let me be clear that I am a windows user and very new to the web world. For the past months I have been learning both python and django, and it has been a gr

3条回答
  •  囚心锁ツ
    2021-02-04 04:33

    Firstly, there's no need to use Ubuntu if you're happier with Windows. I don't know if nginx works on Windows, but I'd be very surprised if it doesn't (in fact, here are the nginx docs for installing on Windows). Apache, meanwhile, definitely does work on Windows. The Django documentation has a full explanation of how to set up Apache/mod_wsgi to serve Django.

    You don't need two servers. I'm not sure why you think you do: the usual reason for that is to have the static assets on a separate server, but you don't mention that as a reason. Since you're only talking about a small site, though, you don't even need to do that. One server configured to serve both Django and the static assets will do fine. Again, the docs explain exactly how to do that.

提交回复
热议问题