PHPackages                             oihana/php-nginx - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. oihana/php-nginx

ActiveLibrary[CLI &amp; Console](/categories/cli)

oihana/php-nginx
================

The Oihana PHP Nginx library

0.0.1(9mo ago)011MPL-2.0PHPPHP &gt;=8.4

Since Aug 12Pushed 7mo agoCompare

[ Source](https://github.com/BcommeBois/oihana-php-nginx)[ Packagist](https://packagist.org/packages/oihana/php-nginx)[ Docs](https://github.com/BcommeBois/oihana-php-nginx)[ RSS](/packages/oihana-php-nginx/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (2)Used By (0)

Oihana PHP - Nginx
==================

[](#oihana-php---nginx)

[![Oihana PHP Nginx](https://raw.githubusercontent.com/BcommeBois/oihana-php-nginx/main/assets/images/oihana-php-nginx-logo-inline-512x160.png)](https://github.com/BcommeBois/oihana-php-nginx)

PHP toolkit to create, modify, and control [NGINX](https://nginx.org/) configurations and commands programmatically.

Built on top of the [Oihana PHP Commands](https://github.com/BcommeBois/oihana-php-commands/) Library.

[![Latest Version](https://camo.githubusercontent.com/742dd9f74ee91c9f58799dcf6be6e4543a65a1e51ba324511de9a57fd0dbb316/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6968616e612f7068702d6e67696e782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oihana/php-nginx)
[![Total Downloads](https://camo.githubusercontent.com/e6dff8a7cfec20641e819c9b7a673a5b4388d33974b890dbfd6915f48cdad11f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f6968616e612f7068702d6e67696e782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oihana/php-nginx)
[![License](https://camo.githubusercontent.com/6186eb062ebd867bc7dc0c877f2190070dd598e7a64d563a44ab4a882986b245/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f6968616e612f7068702d6e67696e782e7376673f7374796c653d666c61742d737175617265)](LICENSE)

📦 Installation
--------------

[](#-installation)

> **Requires [PHP 8.4+](https://php.net/releases/)**

Install via [Composer](https://getcomposer.org):

```
composer require oihana/php-nginx
```

📚 Usage
-------

[](#-usage)

### Configuration Management

[](#configuration-management)

The library provides comprehensive tools for managing Nginx configurations:

- **Path Management**: Handle different Nginx configuration paths
- **Signal Control**: Send signals to Nginx processes
- **Redirect Management**: Create and manage redirect blocks
- **Options Configuration**: Configure Nginx options programmatically

### Enums

[](#enums)

- `NginxPath`: Defines standard Nginx configuration paths
- `NginxSignal`: Available Nginx process signals
- `RedirectDirection`: Redirect direction options

### Helpers

[](#helpers)

- `redirectBlock()`: Generate redirect block configurations

### Options

[](#options)

- `NginxOption`: Individual Nginx option management
- `NginxOptions`: Collection of Nginx options

🧪 Testing
---------

[](#-testing)

To run all tests:

```
composer test
```

📖 Documentation
---------------

[](#-documentation)

For detailed documentation, please refer to the source code and test files in the `src/` and `tests/` directories.

### Project Structure

[](#project-structure)

```
src/oihana/nginx/
├── enums/           # Nginx-related enumerations
├── helpers/         # Helper functions
├── options/         # Configuration options
└── traits/          # Reusable traits

```

🤝 Contributing
--------------

[](#-contributing)

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

📄 License
---------

[](#-license)

This project is licensed under the [Mozilla Public License 2.0 (MPL-2.0)](https://www.mozilla.org/en-US/MPL/2.0/).

🔗 Dependencies
--------------

[](#-dependencies)

This library is built on top of the **Oihana PHP Framework** and includes the following core dependencies:

### Core Framework Dependencies

[](#core-framework-dependencies)

- **oihana/php-core**: Core framework functionality
- **oihana/php-reflect**: Reflection utilities
- **oihana/php-enums**: Enumeration support
- **oihana/php-schema**: Schema validation
- **oihana/php-standards**: Coding standards and utilities
- **oihana/php-files**: File system operations
- **oihana/php-system**: System-level operations
- **oihana/php-commands**: Command-line interface framework

### Development Dependencies

[](#development-dependencies)

- **phpunit/phpunit**: Unit testing framework
- **nunomaduro/collision**: Error reporting for console applications
- **mikey179/vfsstream**: Virtual file system for testing
- **phpdocumentor/shim**: Documentation generation support

All framework dependencies are currently using the `dev-main` branch for development purposes (alpha version).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance62

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

279d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d234506e51778dd3d1d61b6c2af6f294ff963651b4aa509b595d3d2a77b7d89b?d=identicon)[ooop](/maintainers/ooop)

---

Top Contributors

[![ekameleon](https://avatars.githubusercontent.com/u/749032?v=4)](https://github.com/ekameleon "ekameleon (15 commits)")

---

Tags

phpconsolecommandnginx

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/oihana-php-nginx/health.svg)

```
[![Health](https://phpackages.com/badges/oihana-php-nginx/health.svg)](https://phpackages.com/packages/oihana-php-nginx)
```

###  Alternatives

[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k239.8M286](/packages/nunomaduro-termwind)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[alecrabbit/php-cli-snake

Lightweight cli spinner with zero dependencies

29211.3k5](/packages/alecrabbit-php-cli-snake)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
