qazxsw1 发表于 2018-11-10 12:27:55

Nginx安装配置与访问统计

server {  listen       80;                  #监听端口
  server_namelocalhost;             #网站名称
  charset utf-8;                      #网页的默认字符集
  location / {                        #根目录配置
  root   html;                  #网站根目录的位置
  indexindex.html index.htm;    #默认首页
  }
  location ~ /status {                #访问位置为/status
  stub_status   on;                   #打开状态统计功能
  access_log off;                     #关闭此位置的日志记录
  }               //在"server"这里插入的这4行的
  error_page   500 502 503 504/50x.html;#页面错误反馈的页面是 50x.html
  location = /50x.html {            #错误首页位置
  root   html;                  #网站根目录的位置
  }
  }
  }

页: [1]
查看完整版本: Nginx安装配置与访问统计