nginx
nginx: test, reload, logs. Config is always tested before reload/restart.
File aliases/nginx.sh. Disable: export ALIASX_DISABLE="nginx"
Config
| Name | Runs | What it does | |
|---|---|---|---|
ngt | asroot nginx -t | test config | |
ngconf | asroot nginx -T | print full loaded config | |
ngv | nginx -V | version and build options | |
ngsites | ls -l /etc/nginx/sites-enabled /etc/nginx/conf.d 2>/dev/null | enabled sites | |
ngr | test config, then reload if OKexample$ ngr
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful | ||
ngrestart | test config, then restart if OKexample$ ngrestart
nginx: configuration file /etc/nginx/nginx.conf test is successful | ||
ngs | service statusexample$ ngs
● nginx.service - A high performance web server
Active: active (running) |
Logs
| Name | Runs | What it does | |
|---|---|---|---|
nge | follow error logexample$ nge
2026/10/02 10:31:07 [error] 812#812: *41 connect() failed (111: Connection refused) while connecting to upstream | ||
nga | follow access logexample$ nga
203.0.113.9 - - [02/Oct/2026:10:31:07 +0000] "GET /api/users HTTP/1.1" 200 512 |