Skip to main content

A command-line tool for managing Nginx configurations

Project description

ngxcfm

简介

ngxcfm 是一个用于处理 *ix 系统中 Nginx 配置文件的跨平台软件。它提供了一系列命令行工具,用于从服务器下载 Nginx 配置文件、上传本地配置文件到服务器、格式化配置文件、修复符号链接以及启用或禁用特定的 Nginx 配置文件。

功能

  • pull: 从服务器下载 Nginx 配置文件到本地目录。
  • push: 将本地目录中的 Nginx 配置文件上传到服务器。
  • format: 格式化本地目录中的 Nginx 配置文件。
  • relink: 修复本地目录中的符号链接。
  • enable: 启用指定的 Nginx 配置文件。
  • disable: 禁用指定的 Nginx 配置文件。
  • list: 列出配置文件目录中的 Nginx 配置文件。

用法

ngxcfm [动作] [选项] [] [目标]

示例

  • 从服务器下载配置文件到本地目录:

    ngxcfm pull Server1 Server1NginxConfs
    
  • 将本地目录中的配置文件上传到服务器:

    ngxcfm push Server1NginxConfs Server1
    
  • 格式化本地目录中的配置文件:

    ngxcfm format Server1NginxConfs
    
  • 修复本地目录中的符号链接:

    ngxcfm relink Server1NginxConfs
    
  • 启用指定的配置文件:

    ngxcfm enable Server1NginxConfs/sites-available/xxx.conf
    
  • 禁用指定的配置文件:

    ngxcfm disable Server1NginxConfs/sites-available/xxx.conf
    

安装

  1. 克隆项目到本地:

    git clone https://github.com/yourusername/ngxcfm.git
    
  2. 使用pip进行本地安装:

    pip install .
    
  3. 执行 ngxcfm 命令:

    ngxcfm
    

许可证

本项目采用 MIT 许可证。详情请参阅 LICENSE 文件。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ngxcfm-0.3.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ngxcfm-0.3.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file ngxcfm-0.3.0.tar.gz.

File metadata

  • Download URL: ngxcfm-0.3.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for ngxcfm-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c1042843ddb93879b82e33dc690662404ab836d3ccb53a7cfed6450cd66b4da0
MD5 13f72ebc72d4c130d64e2bece8f5dd9c
BLAKE2b-256 53a3eabcf27b0b964383b80f75b549b7e0e17cace0dd52ac03c4d4194646cb3f

See more details on using hashes here.

File details

Details for the file ngxcfm-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ngxcfm-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for ngxcfm-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51bbd5173cc11f50d43f222f2ba6ef0269b3a332631ae2a824b6e054799748b5
MD5 5333707866f35ac4b924e34b86e9e90c
BLAKE2b-256 e4d894036f54395a674b8dfaf17a754cf71e471ff6dde8ba79c6cf418d850994

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page