PHPackages                             webhelper/parser - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. webhelper/parser

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

webhelper/parser
================

WebHelper Parser Interface

0.5.0(9y ago)052MITPHPPHP ^5.4 || ^7.0

Since Sep 3Pushed 6y ago1 watchersCompare

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

READMEChangelog (8)Dependencies (3)Versions (11)Used By (0)

Web Server Configuration File Generic Parser
============================================

[](#web-server-configuration-file-generic-parser)

Part of [WebHelper](http://github.com/JamesRezo/WebHelper), a Generic Httpd Configuration Helper.

[![Build Status](https://camo.githubusercontent.com/f28da11faa02563424891782598ad3d6e0e1ec713eab68f2017ac7ecddc1bcfa/68747470733a2f2f7472617669732d63692e6f72672f4a616d657352657a6f2f77656268656c7065722d7061727365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/JamesRezo/webhelper-parser)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ed63aa4582cf54515b5175237b3c7aa365c8205c5ace32af51107763032bfc98/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a616d657352657a6f2f77656268656c7065722d7061727365722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/JamesRezo/webhelper-parser/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/f3875dd3c16b64641c5269fa690094d833013ba9bc0990218592656f57116daa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a616d657352657a6f2f77656268656c7065722d7061727365722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/JamesRezo/webhelper-parser/?branch=master)[![Code Climate](https://camo.githubusercontent.com/4882e615fe7e123839b8d725d02b98aace17e6abad67128f734518d5c0a921b4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4a616d657352657a6f2f77656268656c7065722d7061727365722f6261646765732f6770612e737667)](https://codeclimate.com/github/JamesRezo/webhelper-parser)[![SensioLabsInsight](https://camo.githubusercontent.com/7885dc9d47ca96317e1ec34e75b82f59767def0c70e2c48b7720ad5d8cf35fb2/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f32656631316535322d393039382d346337322d613063322d6338333939366539626636322f6d696e692e706e67)](https://insight.sensiolabs.com/projects/2ef11e52-9098-4c72-a0c2-c83996e9bf62)[![Dependency Status](https://camo.githubusercontent.com/3e7a6bcdde812c204851b72576245833cbf511c6fe179b33055094cdae58cb86/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3537653634373234626436666136303034653132303464612f62616467652e7376673f7374796c653d666c61742d737175617265)](https://www.versioneye.com/user/projects/57e64724bd6fa6004e1204da)[![Latest Stable Version](https://camo.githubusercontent.com/70df07fdc7f35fe86ff312b9f6fbd30d42003a01f39e1247abc1d46af6903052/68747470733a2f2f706f7365722e707567782e6f72672f77656268656c7065722f7061727365722f762f737461626c65)](https://packagist.org/packages/webhelper/parser)[![License](https://camo.githubusercontent.com/9eeb48655eafe83c550557d1eec0109f4c9be106f96a083d46b39afd7544880c/68747470733a2f2f706f7365722e707567782e6f72672f77656268656c7065722f7061727365722f6c6963656e7365)](https://packagist.org/packages/webhelper/parser)[![StyleCI](https://camo.githubusercontent.com/ae5795cf4769d0e9082420c6679b35f738d7110ac02fb401c3f9d715690f0d24/68747470733a2f2f7374796c6563692e696f2f7265706f732f36373239303936392f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/67290969)

Installation
------------

[](#installation)

`composer require webhelper/parser`

Basic Usage
-----------

[](#basic-usage)

Parse an Apache configuration file:

```
use WebHelper\Parser\Factory;
use WebHelper\Parser\ParserException;
use WebHelper\Parser\InvalidConfigException;

$factory = new Factory()
$parser = $factory->createParser('apache');
$parser->getServer()->setPrefix('/usr');

try {
    $activeConfig = $parser
        ->setConfigFile('/private/etc/apache2/httpd.conf')
        ->getActiveConfig();

    echo $parser->getOriginalConfig();

    echo var_export($activeConfig, true).PHP_EOL;
} catch (ParserException $e) {
    //file not found
    var_dump($e->getMessage());
} catch (InvalidConfigException $e) {
    //empty config or syntax error
    var_dump($e->getMessage());
}
```

Or the same with Nginx

```
use WebHelper\Parser\Factory;

$factory = new Factory()
$parser = $factory->createParser('nginx');
$parser->getServer()->setPrefix('/usr/sbin/');

$activeConfig = $parser
        ->setConfigFile('/etc/nginx/nginx.conf')
        ->getActiveConfig();

// etc...
```

Known issues
------------

[](#known-issues)

- Does not support old macos9 file format.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Every ~1 days

Total

10

Last Release

3528d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a9b7beb8fec4f176788dc1378e297e457a983009dcd8e084ed7bfcea5cbb456?d=identicon)[James](/maintainers/James)

---

Top Contributors

[![JamesRezo](https://avatars.githubusercontent.com/u/6839893?v=4)](https://github.com/JamesRezo "JamesRezo (87 commits)")

---

Tags

webconfigurationparserserverdevopsnginxapache

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webhelper-parser/health.svg)

```
[![Health](https://phpackages.com/badges/webhelper-parser/health.svg)](https://phpackages.com/packages/webhelper-parser)
```

###  Alternatives

[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[felixfbecker/language-server

PHP Implementation of the Visual Studio Code Language Server Protocol

1.2k95.4k](/packages/felixfbecker-language-server)[kassner/log-parser

PHP Log Parser Library

342432.5k6](/packages/kassner-log-parser)[jeromeschneider/baikal

Baïkal is a lightweight CalDAV + CardDAV server based on PHP, SQLite or MySQL, and SabreDAV

3.1k4.6k](/packages/jeromeschneider-baikal)[ryoluo/sail-ssl

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

188672.6k2](/packages/ryoluo-sail-ssl)[romanpitak/nginx-config-processor

Nginx configuration files processor.

7235.3k1](/packages/romanpitak-nginx-config-processor)

PHPackages © 2026

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