ABKYH 发表于 2018-11-10 10:26:55

Nginx服务搭建及配置简介

http {  include mime.types;
  default_type application/octet-stream;
  #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  #access_loglogs/access.logmain;   //访问日志位置
  sendfile on;      //支持文件发送(下载)
  #tcp_nopush on;
  #keepalive_timeout 0;
  keepalive_timeout 65;   //连接保持超时
  #gzip on;
  server {                  //web服务的监听配置
  listen 80;          //监听地址及端口
  server_name www.yun.com;//网站名称(FQDN)
  #charset utf-8;         //网站默认字符集
  #access_loglogs/host.access.logmain;
  location / {            //根目录配置
  root html;          //网站根目录位置
  index index.html index.htm;//默认首页形式
  }
  error_page 500 502 503 504/50x.html;//内部错误的反馈页面
  location = /50x.html {    //错误页面配置
  root html;
  }
  }
  }

页: [1]
查看完整版本: Nginx服务搭建及配置简介