PHPackages                             jorisros/nginxparser - 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. jorisros/nginxparser

ActiveLibrary

jorisros/nginxparser
====================

A class for parsing nginx config files in PHP

1.1(9y ago)55812[1 issues](https://github.com/jorisros/nginxparser/issues)[1 PRs](https://github.com/jorisros/nginxparser/pulls)MITPHPPHP &gt;=5.3.1CI failing

Since Sep 25Pushed 3y ago3 watchersCompare

[ Source](https://github.com/jorisros/nginxparser)[ Packagist](https://packagist.org/packages/jorisros/nginxparser)[ RSS](/packages/jorisros-nginxparser/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/8d4e6eb965264c3fe362321901ff583c222571679673a141cdb9e667a1f2c3dd/68747470733a2f2f7472617669732d63692e6f72672f6a6f726973726f732f6e67696e787061727365722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/jorisros/nginxparser)NginxParser
======================================================================================================================================================================================================================================================================================================

[](#nginxparser)

Read and create Nginx config files in php Requirements
------------------------------------------------------

[](#read-and-create-nginx-config-files-in-phprequirements)

- PHP &gt;= 7.4
- Nginx installed (for the validate function)

Composer
--------

[](#composer)

Use composer to to add the classes to your project

```
composer require jorisros/nginxparser

```

Run tests
---------

[](#run-tests)

Run in the main directory the following command

```
./vendor/bin/phpunit tests

```

Examples
--------

[](#examples)

Examples to use the class

Simple config file

```
