首页 > 其他 > 详细

乌班图16 配置nginx

时间:2018-07-18 16:27:58      阅读:231      评论:0      收藏:0      [点我收藏+]

阿里云 乌班图16

  1. 安装ngnix
    sudo apt install nginx

  2. nginx 启动 重启 关闭

sudo service nginx start restart stop status

  1. nginx 的配置

sudo vim /etc/nginx/nginx.conf

  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;  # 这里切记不能丢掉分号
            }
        }
  }

乌班图16 配置nginx

原文:https://www.cnblogs.com/he-zhi/p/9329300.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!