安裝ngnix
sudo apt install nginxhtml
nginx 啓動 重啓 關閉nginx
sudo service nginx start restart stop statusdjango
sudo vim /etc/nginx/nginx.confvim
http { # upstream django { # server 127.0.0.1:8001; # 使用8001端口與uWSGI服務器通訊 # } server{ listen 80; server_name hezhi.site; # location /ann { # uwsgi_pass django; # include /home/scripts/uwsgi_params; # the uwsgi_params file you installed # } location / { root /home/test; # 靜態文件的目錄 index index.html; # 這裏切記不能丟掉分號 } } }