问题标签 [access-log]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
apache - 从 AWS Beanstalk 检索 Apache 日志文件
我知道 Beanstalk 的快照日志可以为您httpd/access_log
提供该环境 ELB 下的 EC2 实例中文件的最新概览。但是有人知道获取所有日志的好方法吗?
这是一个生产环境,所以我想在其他地方进行处理。但我不想(出于显而易见的原因)配置 root sftp 并手动收集文件。
我想我已经阅读了有关配置日志记录到 S3 的内容?
logging - 如何配置 Dropwizard 访问日志的位置和轮换?
我的日志记录配置如下所示:
这太棒了,我在给定的文件中得到了我的所有日志,并进行了适当的轮换和清理。
除了仍然进入标准输出的访问日志,因此最终(在我的情况下)/var/log/upstart/broker.log
只能由 root 访问。我想使用相同或类似的日志配置将这些日志重定向到/opt/broker/log/access.log
.
这可能吗?如果可以,怎么做?
jetty - 如何在码头的 logback 访问日志中指定响应时间?
我看到您可以通过将“logLatency”设置为 true 或 setLogLatency(true),使用 NCSARequestLog 在 Jetty 中查看给定 HTTP 请求的响应时间。这如何通过 logback implementation(ch.qos.logback.access.jetty.RequestLogImpl) 来完成?
提前感谢您的回答!
nginx - How to not log a get request parameter in the nginx access logs?
I require access logs enabled, but for compliance reasons, cannot log a sensitive GET request parameter's data in the access logs. While I know, I could parse the logs (after-the-fact) and sanitize them, this is not an acceptable solution -- because for compliance reasons logs can't be tampered with.
http://www.example.com/resource?param1=123&sensitive_param=sensitive_data
How can I prevent the "sensitive_data" parameter value from being written to the logs? Here were some ideas:
- Send in POST request -- is not an option with JSONP.
- Use a new location rule for "resource" and set an access log to use a log_format the uses a different format (ie does not use $remote_addr). See this for reference: http://nginx.org/en/docs/http/ngx_http_log_module.html
- Log a $sanitized_remote_addr, and set it (somehow parse the $remote_addr or something else?) before it makes it to the log. We're not sure if this is easy to accomplish.
How should this be done?
logging - access.log 未在 apache2 中记录消息
我在 apache2 的 access.log 日志记录中看到了一个奇怪的行为。仅记录来自同一客户端的前 2 个请求,但之后不记录。
Virtualhost 配置文件具有以下设置:
CustomLog ${APACHE_LOG_DIR}/access.log 组合
谁能告诉我还需要在 apache2 中设置什么才能使访问日志正常工作?
wordpress - Httpd 访问日志显示奇怪的 bingbot
我在云(ec2)中设置了一个服务器,托管了我所有的 WordPress 网站。
我今天注意到该网站遭到黑客攻击..
109.87.118.222 - - [16/Oct/2013:13:10:31 -0400] "POST /wp-login.php HTTP/1.0" 200 3954 " http://smartmoneystrategies.net/wp-login.php " " Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0" 5.15.198.184 - - [16/Oct/2013:13:10:31 -0400] "POST /wp-login.php HTTP/1.0 " 200 3926 " http://smartmoneystrategies.net/wp-login.php " "Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0" 42.116.170.247 - - [16/Oct/2013: 13:10:32 -0400] "POST /wp-login.php HTTP/1.0" 200 3954 " http://smartmoneystrategies.net/wp-login.php " "Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0" 93.78.138.185 - - [16/Oct/2013:13:10:33 -0400] "POST /wp-login.php HTTP/1.0"200 3954" http://smartmoneystrategies.net/wp-login.php" "Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0" 2.95.13.35 - - [16/Oct/2013:13:10:33 -0400] "POST /wp-login.php HTTP /1.0" 200 3940 " http://smartmoneystrategies.net/wp-login.php " "Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0" 93.80.123.137 - - [16/Oct/ 2013:13:10:34 -0400] "POST /wp-login.php HTTP/1.0" 200 3940 " http://smartmoneystrategies.net/wp-login.php " "Mozilla/5.0 (Windows NT 6.1; rv: 19.0) Gecko/20100101 Firefox/19.0" 79.181.39.227 - - [16/Oct/2013:13:10:34 -0400] "POST /wp-login.php HTTP/1.0" 200 3933 " http://smartmoneystrategies。 net/wp-login.php " "Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0"
我想我通过添加登录锁定来捕获 IP 地址来修复攻击。
但我也在那里找到了一大堆这些......
157.56.92.164 - - [16/Oct/2013:09:57:12 -0400] "GET /search.php/?q=bethanny+franklin+haircut&ht=1 HTTP/1.1" 200 11475 "-" "Mozilla/5.0 (兼容;bingbot/2.0;+ http://www.bing.com/bingbot.htm)”157.56.92.164 - - [16/Oct/2013:09:57:13 -0400] “GET /search.php/ ?ht=1&q=address+label+coupon+codes HTTP/1.1" 200 11475 "-" "Mozilla/5.0 (compatible; bingbot/2.0; + http://www.bing.com/bingbot.htm )" 157.56。 92.164 - - [16/Oct/2013:09:57:13 -0400] "GET /search.php/?q=Martell+Gay+Bryce&ht=1 HTTP/1.1" 200 11475 "-" "Mozilla/5.0 (兼容; bingbot/2.0; + http://www.bing.com/bingbot.htm )" 157.56.92.164 - - [16/Oct/2013:09:57:14 -0400] "GET /search.php/?ht =1&q=monterey+fashions+coat HTTP/1.1" 200 11475"-" "Mozilla/5.0(兼容;bingbot/2.0;+http://www.bing.com/bingbot.htm )" 157.56.92.164 - - [16/Oct/2013:09:57:14 -0400] "GET /search.php/?ht=1&q=SUPERPREP+ELITE +semi+pro+team HTTP/1.1" 200 11475 "-" "Mozilla/5.0 (兼容; bingbot/2.0; + http://www.bing.com/bingbot.htm )" 157.56.92.164 - - [16/ Oct/2013:09:57:15 -0400]“GET /search.php/?ht=1&q=rines+para+jeep+cheroki HTTP/1.1”200 11475“-”“Mozilla/5.0(兼容;bingbot/2.0 ; + http://www.bing.com/bingbot.htm )" 157.56.92.164 - - [16/Oct/2013:09:57:15 -0400] "GET /search.php/?ht=1&q=outdoor +pro+staff+opportunity HTTP/1.1" 200 11475 "-" "Mozilla/5.0(兼容;bingbot/2.0;+ http://www.bing.com/bingbot.htm)"
这些是什么?
node.js - 在 node.js(express 框架)中内置访问日志
我想知道node.js(或express框架)是否有任何类型的内置访问日志,例如 grails 有?
我有在 tomcat 上运行的 grails 应用程序,它会自动生成/apache-tomcat-7.0.42/logs/localhost_access_log.2013.10.30.txt
文件,其中包含有关请求响应的日志,如下所示:
此日志由系统自动写入,我不必担心。
那么node.js呢?
谢谢你的帮助!
伊万
webserver - 如何使用 cloudfront 记录请求持续时间?
如何记录使用云端服务的请求的持续时间?
使用通常的 apache,我会在访问日志配置中添加%D
或添加%T
- 但这似乎不适用于 cloudfront。
我将此用作参考文档:http ://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html
apache - 500 错误但没有关于链接 GET / HTTP/1.1" 500 "-" 的信息
在极少数情况下,我的访问日志中会出现以下 500
但是我看不到哪个页面正在抛出它,所以我想知道如何进行故障排除并找到该页面。
谢谢
php - 替换为新的日志文件后访问日志不会记录
我正在尝试对我的 Nginx 服务器上的访问日志文件进行短语访问。
对于文件的措辞,我只需重命名原始访问日志文件并立即创建一个新的访问日志文件,这样我就不会错过任何内容。
但是在替换文件之后,Nginx 不会在该文件上记录任何内容,而是在我替换文件之前工作。
重启 Nginx 后,Nginx 再次开始记录到替换的文件。
我看不到我做错了什么,有什么帮助吗?
PHP 代码的第一部分