apacheconfig
apacheconfig copied to clipboard
Apache / Config::General configuration file parser
If I understand Apache configuration correctly, `RewriteCond` or a lot of them are there to support when `RewriteRule` should happen. Would it make sense to provide have them grouped together?...
``` apacheconfigtool` --interpolatevars example.ini Failed to parse Apache config example.ini: Undefined variable "${u}" referenced ``` example.ini is the same [configuration file supplied with the documentation](https://github.com/etingof/apacheconfig/#interpolatevars). It seems variable names are...
Consider the following config: ``` name stein\ son age 25 color \#000000\ white ``` The parser produces the following output: `{'cops': {'name': 'stein son', 'age': '25', 'colors': {'color': '#000000 white'}}}`...
Currently, any non-alphanumeric text value is quoted. This can be a problem for multi-word values split by spaces, such as `SuexecUserGroup $user $group`. Surrounding its value by double quotes would...
I'm not sure if this is out of scope of this project, but I wanted to use it to parse real apache configs to store them in NoSQL database so...
Value specified as empty string is returned as None by the parser. However the Perl Config::General module keeps the empty string. for example for the below code snippet: ``` name...
Config: ``` # comment TAG apacheconfig.error.ApacheConfigError: Unexpected EOF Can you please check?
I am facing Bad File descriptor transiently from this code. Can you please check? https://github.com/etingof/apacheconfig/blob/081fb8b82853c8a3122c92f29d524bf04a3d1231/apacheconfig/loader.py#L398
`Traceback (most recent call last): File "/usr/local/bin/apacheconfigtool", line 10, in sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/apacheconfigtool.py", line 222, in main config = loader.load(config_file) File "/usr/local/lib/python3.7/dist-packages/apacheconfig/loader.py", line 399, in load return self.loads(f.read(), source=filepath) File...
When parsing and reconstructing configs that contain commands with multiple values such as: `LoadModule mpm_prefork_module modules/mod_mpm_prefork.so` the generated config will break the config: `LoadModule "mpm_prefork_module modules/mod_mpm_prefork.so"` :(