Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Nginx configuration test (out of the box/in non-production env.)

$
0
0
Hey Guys
I'm looking for a way to test nginx configuration syntax in the non-production environment..
I found there is reliable way - "nginx -t -c $configfile". But this tests more things than syntax(hostnames, linked files, etc).

Q:: Is there any way to test just the syntax(if is useable for nginx or not) ???

-----------------------
The goal/reason:
Database containing all configuration file names, types , etc..
I have the configfiles repository containing all configuraton files from all servers.. (10000 files).
And I would like to find type of each one file..

I want to run test function for all types for each one file. And write result (FALSE/TRUE) for each test to DB..
(cfg_httpd=FALSE, cfg_nginx=TRUE, cfg_ini=FALSE, etc..)

This DB will be used to decide which config parser will be used for further processing..

-----------------------
Any help would be greatly appreciated :-)
Thanks!

Viewing all articles
Browse latest Browse all 4759

Trending Articles