ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    nginx 配置ip查询

    Dec 22, 20215 min read

    nginx 配置ip查询

    配置如下:

    location / {
    
      default_type text/plain;
    
      return 200 "$remote_addr\n";
    
    }
    
    // 当然你也可以返回json格式的:
    
    location / {
    
      default_type application/json;
    
      return 200 "{\"ip\":\"$remote_addr\"}";
    
    }
    

    相关文章

    How do I get Twitter data from Twitter API?

    To access Twitter data via the API, follow these steps: create a developer account, set up API access, choose a programming language, install a Twitter API library, connect using API keys, make API requests, and parse/analyze the data.

    SwiftUI 如何扩大按钮的可点击区域?

    在 SwiftUI 中,通过 `padding` 或 `background` 可以调整按钮的可点击区域,其中 `background` 需配合固定尺寸设置。

    Alamofire Swift 网络请求库的使用详解

    Alamofire是一个简化了iOS开发中网络请求处理的Swift库,支持通过CocoaPods安装,并提供了发起GET和POST请求以及处理响应数据的详细方法。

    如何生成和使用Cloudflare签名的免费TLS源证书

    本文介绍了如何通过Cloudflare生成和使用有效期长达15年的免费TLS源证书,并指导了如何在1Panel服务器管理面板中安装和配置这些证书。

    linux sudo 和 su的区别

    在Linux系统中,sudo通过授权方式提升用户权限并记录日志,适用于特定命令执行,而su需要超级用户密码,直接切换身份,适用于全系统操作。