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.2.0.tar.gz (10.3 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.2.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ngxcfm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 be90106eeb72778ac58087c02c5fed0c49ca5197301d674df855cd10b1fc6a5e
MD5 2816594d63b1cde672b2d6177f109f6a
BLAKE2b-256 2ac90e923f01df5b55fc7c3f02dc4e5e02eefca0f9eb350a2d32ec7a9f7118f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ngxcfm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7df93d50ed4196019466a27f890e77b37348d22c67d687a8e960485dc86c62e0
MD5 bb5a46d3785d3f60104b980e2362d7da
BLAKE2b-256 1293317a4cc72f165a5e93479412fa0ceaad14ab6778ac1c6aaf4cffc89249b1

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