Skip to main content

Add your description here

Project description

Inginx

Nginx is a really powerful software, but it requires non-trivial configuration and its own working directory. Command-line configuration is possible but verbose.

This utility creates a temporary working directory and assembles an Nginx configuration optimized for common use cases.

The name “inginx” is derived from “instant Nginx”

Examples

Serve file system

Serve a directory ./dir on 8787

inginx --serve ./dir --listen 0.0.0.0:8787

Output:

Running /usr/bin/freenginx in /tmp/tmpu8151mtc
127.0.0.1 - - [25/Aug/2025:11:18:50 +0200] "GET / HTTP/1.1" 200 263 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"
....

Reverse proxy

Start a reverse proxy up to https://echo.free.beeceptor.com on 8080

inginx --reverse https://echo.free.beeceptor.com --listen 0.0.0.0:8080

Output:

Running /usr/bin/freenginx in /tmp/tmpo66xmvm_
127.0.0.1 - - [25/Aug/2025:11:21:03 +0200] "GET / HTTP/1.1" 200 844 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"
...

Common Flags

  • --serve <directory> - Serve a local filesystem directory

  • --reverse <remote> - Set up a reverse proxy

  • --listen <address[:port]> - Tell Nginx what address/port to use

Installation

This is a self-contained script that has no dependencies. It is aiming to work on as old Python as 3.7.

Managed installation (uvx, pipx)

Ideal solution, but needs uvx, or pipx pre-installed This is the most painless solution

uvx inginx --help
pipx install inginx
inginx --help

pip

pip install --user inginx --break-system-packages

[!WARNING] This is generally not recommended. It will work and not break anything in this case because inginx does not have any dependencies.

Manual

wget https://raw.githubusercontent.com/richard-hajek/inginx/refs/heads/main/inginx/inginx.py -O ~/.local/bin
chmod +x ~/.local/bin/inginx

[!WARNING] Check that ~/.local/bin is in your path by doing echo $PATH and checking, with your eyes, if '.local/bin' is there If not, good luck, have fun, see https://askubuntu.com/questions/440691/add-a-binary-to-my-path for detailed instructions how to manage your $PATH

Advanced configuration

This tool is not indended for advanced configuration. It will however provide you with a good starting point. If you want to further customize the nginx instance, do

mkdir ./prefix
cd ./prefix
inginx <your configuration> --dry > nginx.conf

and then make any changes you want to the generated nginx.conf

And run your nginx with

freenginx -p $(realpath .) -c $(realpath ./nginx.conf)

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

inginx-0.3.16.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

inginx-0.3.16-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file inginx-0.3.16.tar.gz.

File metadata

  • Download URL: inginx-0.3.16.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for inginx-0.3.16.tar.gz
Algorithm Hash digest
SHA256 4d5c475c7abe7befb1b4f3453c2cc628b661971bf640052cca9b7acae09ab74b
MD5 03d8099bbe4e63d7f7a2a0fdc2d978eb
BLAKE2b-256 af1971df64bf82d8e37ddeb8ed3ce4c1b94089f40a0c323cc48199edfc7be4ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for inginx-0.3.16.tar.gz:

Publisher: workflow.yml on richard-hajek/inginx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file inginx-0.3.16-py3-none-any.whl.

File metadata

  • Download URL: inginx-0.3.16-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for inginx-0.3.16-py3-none-any.whl
Algorithm Hash digest
SHA256 ca6e1213b7e100ea9948cbe98509857ea7d0ddab18d9e8ae156ee6858f218b26
MD5 14856a415dfdff598e4706b748d29262
BLAKE2b-256 1eabfb7f956ce9ef9d57eb980345b0028668255d60fb671fb4f7fc9a9df04473

See more details on using hashes here.

Provenance

The following attestation bundles were made for inginx-0.3.16-py3-none-any.whl:

Publisher: workflow.yml on richard-hajek/inginx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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