Các bài viết mới

Trang: 1 2 [3] 4 5 ... 10
21
Pháp luật / [Cục XNC] Thủ tục xin Visa
« Bài mới nhất gửi bởi admin vào lúc Thứ tư, 13/03/2024, 08:49:55 am »
Bạn không thể xem liên kết này. Đăng ký hoặc Đăng nhập
22
NGINX / NGINX - Disable loggin inside an if block to block access
« Bài mới nhất gửi bởi admin vào lúc Thứ ba, 12/03/2024, 11:17:38 pm »
In NGINX, when you use the return 403; directive inside an if block to block access, by default, this action is logged to the NGINX access log. If you want to block certain requests (e.g., from bots you've identified and flagged through the $blocked_bot variable) without logging these blocked requests to the access log, you'll need to employ a slightly different strategy, as NGINX does not provide a direct way to skip logging for specific conditions directly within its standard logging directives.

One common approach is to use a separate location block that handles requests meant to be blocked and not logged. Here's how you can do it:

Set up a named location that serves the 403 without logging: You use a named location (for example, @no_log_403) to return the 403 status. Within this location block, you can either disable logging or direct the logs to a different log file that you don't monitor.

Redirect blocked bots to the named location: Instead of directly returning 403 in the if block, you rewrite the request to the named location.

Here's an example configuration illustrating this approach:

Code: Bạn không thể xem liên kết này. Đăng ký hoặc Đăng nhập
# Flag the bots or conditions you want to block without logging
map $http_user_agent $blocked_bot {
    default 0;
    ~*badbot 1;  # Example bot pattern
}

server {
    listen 80;

    # Main access log - requests blocked without logging won't appear here
    access_log /var/log/nginx/access.log combined;

    # Dummy log for blocked requests, you can ignore this file
    # Alternatively, you can set it to /dev/null if you don't want to keep these logs at all
    access_log /var/log/nginx/blocked.log combined if=$log_blocked;

    # Regular location blocks and server configuration go here

    if ($blocked_bot) {
        set $log_blocked 0; # Do not log
        rewrite ^ /blocked_bot last; # Redirect to a named location for handling
    }

    # Named location for handling blocked requests without logging
    location @blocked_bot {
        access_log off; # Disable logging for this location
        return 403;
    }
}

In this configuration:

The map directive is used to flag user agents of bad bots as $blocked_bot.
If a request is identified as coming from a blocked bot, it is rewritten to the /blocked_bot URI.
The @blocked_bot named location matches this rewritten URI and serves a 403 response without logging the request (using access_log off;).
This setup ensures that requests from blocked bots are denied without polluting your main access log. Remember to adjust the criteria for identifying $blocked_bot as needed for your specific scenario.
23
Wordpress / [Wordpress] Error: cURL error 7 failed to connect to port 443
« Bài mới nhất gửi bởi admin vào lúc Thứ ba, 12/03/2024, 11:05:02 pm »
Error: cURL error 7 failed to connect to port 443

The REST API encountered an error
Performance
The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.

When testing the REST API, an error was encountered:

REST API Endpoint: Bạn không thể xem liên kết này. Đăng ký hoặc Đăng nhập
REST API Response: (http_request_failed) cURL error 7: Failed to connect to ddnbgroup.com port 443 after 126 ms: Couldn't connect to server


Code: Bạn không thể xem liên kết này. Đăng ký hoặc Đăng nhập
curl -k -u "username" https://ddnbgroup.com/wp-json/wp/v2/types/post?context=edit

{"code":"rest_forbidden_context","message":"Sorry, you are not allowed to edit posts in this post type.","data":{"status":401}}

Code: Bạn không thể xem liên kết này. Đăng ký hoặc Đăng nhập
curl -k -u "username" https://ddnbgroup.com/wp-json/wp/v2/types/post?context=view

{
"description": "",
"hierarchical": false,
"has_archive": false,
"name": "Posts",
"slug": "post",
"icon": "dashicons-admin-post",
"taxonomies": [
"category",
"post_tag"
],
"rest_base": "posts",
"rest_namespace": "wp/v2",
"_links": {
"collection": [
{
"href": "https://ddnbgroup.com/wp-json/wp/v2/types"
}
],
"wp:items": [
{
"href": "https://ddnbgroup.com/wp-json/wp/v2/posts"
}
],
"curies": [
{
"name": "wp",
"href": "https://api.w.org/{rel}",
"templated": true
}
]
}
}

24
Google / Google developers
« Bài mới nhất gửi bởi admin vào lúc Thứ ba, 12/03/2024, 01:58:47 pm »
25
Chatbot / Google Gemini (Bard)
« Bài mới nhất gửi bởi admin vào lúc Thứ ba, 12/03/2024, 09:12:24 am »
Bạn không thể xem liên kết này. Đăng ký hoặc Đăng nhập
26
SMF / [SMF] Latest news
« Bài mới nhất gửi bởi admin vào lúc Thứ ba, 12/03/2024, 08:45:31 am »
27
Chatbot / ChatGPT
« Bài mới nhất gửi bởi admin vào lúc Thứ ba, 12/03/2024, 08:42:34 am »
28
English News / Deadline - Breaking Hollywood News
« Bài mới nhất gửi bởi admin vào lúc Thứ hai, 8/01/2024, 01:18:23 pm »
29
Nhật Bản / 竈門炭治郎のうた - 椎名豪 featuring 中川奈美(フル)
« Bài mới nhất gửi bởi admin vào lúc Chủ nhật, 7/01/2024, 04:28:54 pm »
Bạn không thể xem liên kết này. Đăng ký hoặc Đăng nhập

目を閉じて 思い出す
過ぎ去りし あの頃の
戻れない 帰れない
広がった 深い闇
戻れない 帰れない
広がった 深い闇
泣きたくなるような 優しい音
どんなに苦しくても
前へ 前へ 進め 絶望断ち
失っても 失っても 生きていくしかない
どんなにうちのめされても 守るものがある
失っても 失っても 生きていくしかない
どんなにうちのめされても 守るものがある
我に課す 一択の
運命と 覚悟する
泥を舐め 足掻いても
目に見えぬ 細い糸
泣きたくなるような 優しい音
どんなに悔しくても
前へ 前へ 向かえ 絶望断ち
傷ついても 傷ついても 立ち上がるしかない
どんなにうちのめされても 守るものがある
守るものがある

Me wo tojite omoidasu
Sugisarishi ano koro no
Modorenai kaerenai
Hirogatta fukai yami

Modorenai kaerenai
Hirogatta fukai yami
Nakitaku naru you na yasashii oto
Donna ni kurushikutemo
Mae e mae e susume zetsubou tachi

Ushinattemo ushinattemo ikite iku shika nai
Donna ni uchinomesaretemo mamoru mono ga aru

Nhắm mắt lại và nhớ
Những ngày xưa đã qua
Không thể trở lại, không thể quay về
Bóng tối sâu thẳm đang lan rộng
Không thể trở lại, không thể quay về
Bóng tối sâu thẳm đang lan rộng
Âm thanh dịu dàng khiến ta muốn khóc
Dù cho có khó khăn đến đâu
Hãy đi về phía trước, vượt qua tuyệt vọng
Dù cho ta có mất đi, ta vẫn phải sống
Dù cho có bị đánh bại đến đâu, ta vẫn có điều phải bảo vệ
Dù cho ta có mất đi, ta vẫn phải sống
Dù cho có bị đánh bại đến đâu, ta vẫn có điều phải bảo vệ
Chúng ta phải đối mặt với sự lựa chọn duy nhất
Và sẵn sàng với số phận
Dù cho ta phải nếm mùi bùn và đấu tranh
Nhưng có một sợi dây mỏng manh không thể thấy bằng mắt
Âm thanh dịu dàng khiến ta muốn khóc
Dù cho có hối tiếc đến đâu
Hãy đi về phía trước, vượt qua tuyệt vọng
Dù cho ta có bị tổn thương, ta vẫn phải đứng lên
Dù cho có bị đánh bại đến đâu, ta vẫn có điều phải bảo vệ
Có điều phải bảo vệ
30
日本語新聞 / Yahoo Japan - Sport Navi
« Bài mới nhất gửi bởi admin vào lúc Thứ năm, 4/01/2024, 01:37:21 pm »
Trang: 1 2 [3] 4 5 ... 10