当前位置:论坛首页 > Linux面板 > 求助

【已回应】阿里云提示这个怎么处理?

发表在 Linux面板2020-4-2 23:49 [复制链接] 1 1128

本帖最后由 谢花郎 于 2020-4-3 09:37 编辑

开启Nginx的WEB访问日志记录: 1、打开conf/nginx.conf配置文件; 2、在http下配置access_log
access_log logs/host.access.log main; 3、 并删除off


哪位大神发个详细修改
使用道具 举报 只看该作者 回复
发表于 2020-4-3 09:35:59 | 显示全部楼层
  1. user  www www;
  2. worker_processes auto;
  3. error_log  /www/wwwlogs/nginx_error.log  crit;
  4. pid        /www/server/nginx/logs/nginx.pid;
  5. worker_rlimit_nofile 51200;

  6. events
  7.     {
  8.         use epoll;
  9.         worker_connections 51200;
  10.         multi_accept on;
  11.     }

  12. http
  13.     {
  14.         include       mime.types;
  15.                 #include luawaf.conf;

  16.                 include proxy.conf;

  17.         default_type  application/octet-stream;

  18.         server_names_hash_bucket_size 512;
  19.         client_header_buffer_size 32k;
  20.         large_client_header_buffers 4 32k;
  21.         client_max_body_size 50m;

  22.         sendfile   on;
  23.         tcp_nopush on;

  24.         keepalive_timeout 60;

  25.         tcp_nodelay on;

  26.         fastcgi_connect_timeout 300;
  27.         fastcgi_send_timeout 300;
  28.         fastcgi_read_timeout 300;
  29.         fastcgi_buffer_size 64k;
  30.         fastcgi_buffers 4 64k;
  31.         fastcgi_busy_buffers_size 128k;
  32.         fastcgi_temp_file_write_size 256k;
  33.                 fastcgi_intercept_errors on;

  34.         gzip on;
  35.         gzip_min_length  1k;
  36.         gzip_buffers     4 16k;
  37.         gzip_http_version 1.1;
  38.         gzip_comp_level 2;
  39.         gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
  40.         gzip_vary on;
  41.         gzip_proxied   expired no-cache no-store private auth;
  42.         gzip_disable   "MSIE [1-6]\.";

  43.         limit_conn_zone $binary_remote_addr zone=perip:10m;
  44.                 limit_conn_zone $server_name zone=perserver:10m;

  45.         server_tokens off;
  46.         access_log off;

  47. server
  48.     {
  49.         listen 888;
  50.         server_name phpmyadmin;
  51.         index index.html index.htm index.php;
  52.         root  /www/server/phpmyadmin;

  53.         #error_page   404   /404.html;
  54.         include enable-php.conf;

  55.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  56.         {
  57.             expires      30d;
  58.         }

  59.         location ~ .*\.(js|css)?$
  60.         {
  61.             expires      12h;
  62.         }

  63.         location ~ /\.
  64.         {
  65.             deny all;
  66.         }

  67.         access_log  /www/wwwlogs/access.log;
  68.     }
  69. include /www/server/panel/vhost/nginx/*.conf;
  70. }
复制代码
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理
快速回复 返回顶部 返回列表