dyok 发表于 2018-11-9 06:41:12

Nginx的安装配置及访问状态统计

http {  include       mime.types;       //支持多媒体
  default_typeapplication/octet-stream;
  log_formatmain'$remote_addr - $remote_user [$time_local] "$r    equest" '
  '$status $body_bytes_sent "$http_referer" '
  '"$http_user_agent" "$http_x_forwarded_for"';
  //访问日志位置
  access_loglogs/access.logmain;
  sendfile      on;          //支持文件发送(下载)
  keepalive_timeout65;          //连接保持超时
  server {                              //Web服务的监听配置
  listen       80;               //监听的端口
  server_namewww.benet.comt;    //网站名称
  charset utf-8;                  //默认字符集
  location / {
  root   html;               //网站根目录的位置
  indexindex.html index.htm;   //默认首页(索引页)
  }

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