乌班图16 配置nginx

阿里云 乌班图16

  1. 安装ngnix
    sudo apt install nginxhtml

  2. nginx 启动 重启 关闭nginx

sudo service nginx start restart stop statusdjango

  1. nginx 的配置

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;  # 这里切记不能丢掉分号
            }
        }
  }
相关文章
相关标签/搜索