AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[log-files](server)

Martin Hope
Merennulli
Asked: 2023-07-20 02:16:10 +0800 CST

OPTIONS 方法在 IIS10 日志中获取 200 状态而不是 301

  • 5

我试图了解为什么 OPTIONS 方法请求(大概是 CORS 预检请求)被记录为 200 状态,而所有 GET 方法请求都被记录为预期的 301(永久移动)。该地址唯一返回的是带有新地址的 Response.RedirectPermanent。

就上下文而言,301 已经存在几周了,而且在许多情况下,Referer URL 已经消失了很长时间,所以我的第一个想法是这是一个脚本化调用。除了这些 OPTIONS 请求之外,点击我正在查看的特定 URL 的其他所有内容都有明显的自动化迹象,例如来自早已消失的引用者。对于这些 OPTIONS 请求,日志中的给定地址通常只会对服务器进行一次调用,然后就不再调用了。因此,该模式表明它是某种形式的自动化的代理。再次强调,本段只是为了提供上下文,而不是问题本身。我并不担心潜在的自动化。

回到问题 - 为什么在这种情况下这些 OPTIONS 请求显示为 200?最终,我试图找出原因是因为我想知道我是否需要做任何事情来正确适应这些请求,或者这是否只是此类永久重定向请求的预期行为。

log-files
  • 1 个回答
  • 21 Views
Martin Hope
wtf_1x
Asked: 2022-10-25 02:15:53 +0800 CST

auth.log 中的哪些条目可能是危险的,哪些不是

  • 5

auth.log 中的哪些条目不好,或者我应该害怕哪个条目?

Oct  3 05:00:01 webv2 CRON[25757]: pam_unix(cron:session): session opened for user www-data(uid=33) by (uid=0)
Oct  3 05:00:01 webv2 CRON[25757]: pam_unix(cron:session): session closed for user www-data

1)是因为我在 /etc/sudoers 中有一些条目允许 www-data 启动文件还是我错了?

Oct  3 08:23:30 webv2 PackageKit: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
Oct  3 08:23:30 webv2 PackageKit: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh
Oct  3 10:58:14 webv2 polkitd(authority=local): Unregistered Authentication Agent for unix-session:1 (system bus name :1.26, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale de_AT.UTF-8) (disconnected from bus)
Oct  3 10:58:36 webv2 polkitd(authority=local): Registered Authentication Agent for unix-session:1 (system bus name :1.28 [lxpolkit], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale de_AT.UTF-8)

2)不知道。那个“未注册的身份验证代理”和“已注册的身份验证代理”让我感觉不舒服

Oct  3 12:55:13 webv2 dbus-daemon[549]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.25" (uid=1000 pid=1153 comm="/usr/bin/pulseaudio --daemonize=no --log-target=jo") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.27" (uid=0 pid=1383 comm="/usr/libexec/bluetooth/bluetoothd ")

3)?? 我只看到 org.freedesktop。并问自己与蓝牙有什么关系?

Oct  3 10:58:14 webv2 lightdm: pam_unix(lightdm-autologin:session): session closed for user pi
Oct  3 10:58:26 webv2 lightdm: pam_unix(lightdm-autologin:session): session opened for user pi(uid=1000) by (uid=0)
Oct  3 10:58:27 webv2 lightdm: pam_unix(lightdm-autologin:session): session opened for user pi(uid=1000) by (uid=0)

4 ) 灯光显示管理器。那是因为我为 pi 安装了普通的桌面 GUI 吗?我也可以通过 vnc 加入我的 pi,但我并不经常使用它,因为我对 ssh 非常熟悉。那么他是不是让我自动登录到桌面?

Oct  3 10:58:58 webv2 login[722]: pam_unix(login:session): session opened for user pi(uid=1000) by LOGIN(uid=0)

5)我对那个味精的问题是,它不像其他登录味精那样典型。这里有什么好害怕的吗?

谢谢任何帮助

log-files
  • 1 个回答
  • 30 Views
Martin Hope
Cyanmodex9
Asked: 2022-02-14 04:46:00 +0800 CST

带有两台服务器的 nginx 反向代理 404

  • 0

我的 NGINX 配置有问题。我有两个在 Windows 服务器上运行的网络服务器。哪个是从外部调用的 443,然后应该转发到带有 41001 的服务器。第二个服务器块应该称为 FQDN,nginx 应该将它转发到 FQDN.com/test。内部和外部。

在第一个服务器块上,这需要永远加载,并且似乎没有任何效果。使用第二个服务器块,我得到了 404。

这是我的配置和错误日志的样子

server {
    server_name test.example.com;
    return 301 http://test.example.com/test$request_uri;
    }


server {
        listen  443 ssl http2;
        listen  [::]:443 ssl http2;
 
        access_log /var/log/nginx/test_service_access.log;
        error_log /var/log/nginx/test_service_error.log;

        ssl_certificate /etc/nginx/ssl/test.com.pem;
        ssl_certificate_key /etc/nginx/ssl/test.key;
        ssl_session_timeout 1d;
        ssl_session_tickets off;
        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-G>        ssl_prefer_server_ciphers off;

        location /test {
        proxy_pass https://10.10.10.10/test/;
        }

        client_max_body_size    0;
        proxy_connect_timeout   90s;
        proxy_send_timeout              90s;
        proxy_read_timeout              90s;
        send_timeout                    90;
    }

server {
        server_name test2.example.com;
        # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
        return 301 https://test2.example.com$request_uri;
}

server {
        listen  443 ssl http2;
        listen  [::]:443 ssl http2;
        server_name test2.example.com;

        access_log /var/log/nginx/test2_service_access.log;
        error_log /var/log/nginx/test2_service_error.log;

        ssl_certificate /etc/nginx/ssl/test2.example.com.pem;
        ssl_certificate_key /etc/nginx/ssl/test2example.key;

#       ssl_session_cache shared:SSL:50m;
        ssl_session_timeout 1d;
        ssl_session_tickets off;
        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-G>
        ssl_prefer_server_ciphers off;

        add_header Strict-Transport-Security max-age=15768000;

        location / {

#       resolver 10.150.10.10 8.8.8.8;
        proxy_pass https://test2.example.com:41001/;
        proxy_redirect  https://test2.example.com:41001/ https://test2.example.com/;

        client_max_body_size    0;
        proxy_connect_timeout   90s;
        proxy_send_timeout              90s;
        proxy_read_timeout              90s;
        send_timeout                    90;
        }
    }
}

我查看了error.logs,这就是出现的问题。

2022/02/13 12:54:58 [error] 2620#2620: *15 open() "/usr/share/nginx/html/DocuWare/Platform/LoginRedirect" failed (2: No such file or directory), client: xxx.xxx.xxx.xxx, server: , request: "GET /DocuWare/Platform/LoginRedirect?returnUrl=%2fdocuware%2fPlatform%2fWebClient%2f HTTP/2.0", host: "test2.domain.com", referrer: "https://test.domain.com/docuware/Platform/WebClient/"

2022/02/13 12:35:17 [error] 2541#2541: *1 upstream timed out (110: Connection timed out) while connecting to upstream, client:

关于第一个错误,我不明白到底是什么问题

据我了解,我需要为端口 41001 的服务器定义一个上游,对吗?

我在这里错过了什么吗?

更新

我已经将我的配置调整到最小,以便我可以测试它。如下我的配置看起来像这样

######################################################################
   upstream abacus {
      server 10.120.50.11; 
   }
   
   server {
      listen 80;
      server_name abacus.example.com;
      return 301 https://abacus.example.com$request_uri;
   }
    
   server {
      listen 443 ssl;
      server_name abacus.example.com;
      ssl_certificate /etc/nginx/ssl/xxx.com.pem;
      ssl_certificate_key /etc/nginx/ssl/xxx.key;
      ssl_protocols TLSv1.2 TLSv1.3;

      access_log /var/log/nginx/abacus_service_access.log;
      error_log /var/log/nginx/abacus_service_error.log;

   location / {
      proxy_pass http://abacus;
   }
}

#######################################################################
   upstream docuware {
      server 10.120.50.10; 
   }
   
   server {
      listen 80;
      server_name docuware.example.com;
      return 301 https://docuware.example.com$request_uri;
   }
   
   server {
      listen 443 ssl;
      server_name docuware.example.com;
      ssl_certificate /etc/nginx/ssl/xxx.pem;
      ssl_certificate_key /etc/nginx/ssl/xxx.key;
      ssl_protocols TLSv1.2 TLSv1.3;

      access_log /var/log/nginx/docuware_service_access.log;
      error_log /var/log/nginx/docuware_service_error.log;
      
   location / {
      proxy_pass http://docuware/docuware;
   }
}
}

当我访问服务器“abacus.example.com”时,我进入了 IIS 主页。所以在这里我必须定义我来自外部的 443 (HTTPS) 并且我被重定向到端口 23001。

如果我访问服务器“docuware.example.com/docuware”,我会收到 404 - 找不到文件或目录。所以在这里我必须以某种方式定义它可以使用子路径访问服务器。

在内部网络中,这可以正常工作。我被重定向到“docuware.example.com/DocuWare/Platform/WebClient/ClientAccount/xxx”。

你看到这里我需要调整什么了吗?几个小时以来,我一直在努力反对它。

log-files nginx nginx-reverse-proxy iis-8.5 external-connection
  • 2 个回答
  • 563 Views
Martin Hope
Retro_0
Asked: 2022-02-04 01:26:24 +0800 CST

远程日志记录是否会停止本地日志记录

  • 0

我正在使用 Graylog 服务器来集中来自网络设备和服务器的日志,我想知道交换机、Windows 机器和其他设备上的 Syslog 服务是否仍会在本地保存日志,或者只是远程发送它们并停止本地日志记录过程?

log-files syslog rsyslog graylog
  • 1 个回答
  • 66 Views
Martin Hope
Noah Broyles
Asked: 2021-08-27 07:36:01 +0800 CST

Apache2 access.log 有多行说“组合”

  • 7

我在 Ubuntu 20.04.2 LTS 上运行 Apache2 网络服务器。我注意到我access.log有几行只是简单地说明combine它们,没有关于请求或其他任何信息的信息。中的其他行access.log没有说combine,并且确实有关于请求的信息。

这是我的示例access.log:

combine
combine
combine
45.129.136.74 - - [26/Aug/2021:00:17:23 -0400] "\x03" 400 0 "-" "-"
45.129.136.74 - - [26/Aug/2021:00:17:23 -0400] "\x03" 400 0 "-" "-"
combine
192.241.204.78 - - [26/Aug/2021:00:23:55 -0400] "GET / HTTP/1.1" 200 546 "-" "Mozilla/5.0 zgrab/0.x"
84.54.153.88 - - [26/Aug/2021:00:27:54 -0400] "GET / HTTP/1.1" 200 621 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7"
combine
combine
45.146.164.110 - - [26/Aug/2021:01:02:57 -0400] "POST /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1" 404 438 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:57 -0400] "POST /api/jsonws/invoke HTTP/1.1" 404 438 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:57 -0400] "GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1" 404 438 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:57 -0400] "GET /?a=fetch&content=<php>die(@md5(HelloThinkCMF))</php> HTTP/1.1" 200 565 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:58 -0400] "GET /?XDEBUG_SESSION_START=phpstorm HTTP/1.1" 200 565 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:58 -0400] "GET /solr/admin/info/system?wt=json HTTP/1.1" 404 438 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:58 -0400] "GET /wp-content/plugins/wp-file-manager/readme.txt HTTP/1.1" 404 438 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:58 -0400] "GET /index.php?s=/Index/\\think\\app/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21 HTTP/1.1" 404 438 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:58 -0400] "GET /console/ HTTP/1.1" 404 438 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:58 -0400] "POST /Autodiscover/Autodiscover.xml HTTP/1.1" 404 438 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.146.164.110 - - [26/Aug/2021:01:02:58 -0400] "GET /_ignition/execute-solution HTTP/1.1" 404 438 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
45.129.136.74 - - [26/Aug/2021:01:05:21 -0400] "\x03" 400 0 "-" "-"
205.185.126.200 - - [26/Aug/2021:01:12:58 -0400] "POST /boaform/admin/formLogin HTTP/1.1" 404 475 "http://40.121.65.70:80/admin/login.asp" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0"
185.189.182.234 - - [26/Aug/2021:01:32:22 -0400] "GET / HTTP/1.1" 400 0 "-" "-"
42.193.16.135 - - [26/Aug/2021:01:34:15 -0400] "GET / HTTP/1.1" 200 565 "-" "Mozilla/5.0 (Linux; Android 10; LIO-AN00 Build/HUAWEILIO-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.62 XWEB/2692 MMWEBSDK/200901 Mobile Safari/537.36"
206.189.182.136 - - [26/Aug/2021:01:45:23 -0400] "GET /ab2g HTTP/1.1" 400 0 "-" "-"
206.189.182.136 - - [26/Aug/2021:01:45:23 -0400] "GET /ab2h HTTP/1.1" 400 0 "-" "-"
combine
combine
combine
combine
combine

我的apache2.conf有以下几行:

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

同样在我的一个sites-enabled配置文件中,我有这一行:

CustomLog ${APACHE_LOG_DIR}/access.log combine

combine访问日志中的行是什么意思?为什么我会关心看到他们?我怎样才能防止这些台词只是说combine并让它们真正显示一些有用的信息?

logging log-files apache2
  • 1 个回答
  • 1366 Views
Martin Hope
William
Asked: 2021-03-18 00:44:25 +0800 CST

关于httpd日志的一些问题

  • 0

第一个问题:为什么会有两个错误日志文件?一种是 /var/www/mywebsite/error.log,<VirtualHost>在 ErrorLog 指令中指定。另一个是 /var/log/httpd/error_log。我找不到它的定义位置。/etc/httpd/conf/httpd.conf 外面有一行<VirtualHost>:

ErrorLog "logs/error_log"

但我认为这与/var/log/httpd/error_log 不对应。

第二个问题:为什么两个错误日志文件的所有者都是 root:root,而不是 /etc/httpd/conf/httpd.conf 中指定的 apache:apache:

User apache
Group apache
log-files httpd.conf apache-2.4 centos7
  • 1 个回答
  • 40 Views
Martin Hope
Dani
Asked: 2020-12-09 01:42:08 +0800 CST

将真实 IP 地址从一个 nginx 实例传递到另一个实例并将其写入日志

  • 1

将请求移动到我添加到调用中的内部 nginx 服务器:

proxy_set_header X-Real-IP $remote_addr;

当我尝试在日志中打印此值时,内部 nginx 容器崩溃:

log_format verbose ' Real: $X-Real-IP ';

我究竟做错了什么?(我也尝试在变量周围使用“”,但没有帮助。)

log-files nginx reverse-proxy
  • 2 个回答
  • 1174 Views
Martin Hope
Vexer
Asked: 2020-11-09 15:14:04 +0800 CST

Linux 审计文件(data=)

  • 2

type=TTY msg=audit(08/12/2020 02:33:30.163:107) : tty pid=2709 uid=e4ws5 auid=root ses=1 major=4 minor=1 comm=sh data="/bin/bash -i",<nl>

谁能告诉我在此 audit.log 中如何有一个名为 data= 的字段名称,其中包含正在执行的命令,这是日志文件中的自定义配置还是默认配置。

linux log-files audit
  • 1 个回答
  • 105 Views
Martin Hope
Quirik
Asked: 2020-11-09 11:17:28 +0800 CST

ISP 使用哪些工具来浏览日志?

  • -1

众所周知,ISP 必须出于各种目的(例如执法需要)记录各种网络数据。

但是,ISP 使用哪些软件工具来浏览如此大量的网络日志?

此外,对于 ISP 来说,例如,在被传唤的情况下查找给定 IP 地址后面的用户需要多长时间?

log-files isp
  • 1 个回答
  • 111 Views
Martin Hope
saffron
Asked: 2020-10-06 20:56:27 +0800 CST

使用 poweshell 脚本添加新行时将内容从文件复制到另一个文件

  • 0

我有一个名为 server1.txt 的文件和一个名为 server1_copy.txt 的文件。在 server1.txt 中,所有日志都将从应用程序中添加。因此,每当在 server1.txt 中添加新行时,我们都需要将其复制并粘贴到 server1_copy.txt 中。我们可以将代码保存在 powershell 脚本中,并安排它每 30 分钟运行一次以执行此操作。

我在 Powershell 脚本方面没有太多经验。但是我在网上浏览了这么多文件,找不到正确的解决方案。

有谁知道我们如何使用 Powershell 脚本来实现这一点。

log-files powershell shell-scripting
  • 1 个回答
  • 290 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve