Operations 7 min read

Using NginxConfig to Visually Generate and Deploy Nginx Configurations for Static and API Sites

This article introduces the open‑source visual tool NginxConfig, walks through installing Node.js and NginxConfig, shows how to configure documentation, front‑end, and API sites, generate the Nginx configuration, and deploy it on a Linux server.

IT Services Circle
IT Services Circle
IT Services Circle
Using NginxConfig to Visually Generate and Deploy Nginx Configurations for Static and API Sites

Nginx is a widely used web server, but its configuration can be cumbersome; the open‑source visual tool NginxConfig simplifies this process by allowing users to generate Nginx configurations through a graphical interface. NginxConfig claims to be the only Nginx configuration tool you need and already has over 15K stars on GitHub, indicating strong community support.

Installation – Node.js : Download the Node.js package from the official site, extract it to /usr/local/src/, and create symbolic links for node and npm so they are available system‑wide.

cd /usr/local/src/
tar xf node-v16.14.2-linux-x64.tar.xz
cd node-v16.14.2-linux-x64/
./bin/node -v
ln -s /usr/local/src/node-v16.14.2-linux-x64/bin/node /usr/bin/node
ln -s /usr/local/src/node-v16.14.2-linux-x64/bin/npm /usr/bin/npm
node -v
npm -v

Installation – NginxConfig : Clone or download the NginxConfig package from its GitHub repository, extract it, install dependencies with npm install, and start the development server with npm run dev.

tar -zxvf nginxconfig.io-master.tar.gz
npm install
npm run dev

Usage preparation : Ensure Nginx is installed, then add the following entries to the local /etc/hosts file so the three domains resolve to the server IP:

192.168.3.105 docs.macrozheng.com
192.168.3.105 mall.macrozheng.com
192.168.3.105 api.macrozheng.com

Documentation site configuration : In NginxConfig, select the "frontend" preset, modify the service settings to point to the documentation root, disable the Content‑Security‑Policy, enable Gzip compression, and remove resource‑expiry limits.

Front‑end site configuration : Add a second site with similar settings, adjusting the server name and root directory to serve the Mall front‑end application.

API site configuration : Add a third site, enable reverse proxy, and point it to the online SpringBoot API endpoint, optionally disabling the routing feature.

Generate configuration : Click the download button in the UI, rename the resulting archive, extract it on the Linux server, and copy the generated files into Nginx’s html directory. tar -zxvf nginxconfig.io.tar.gz Restart Nginx to apply the new configuration: docker restart nginx Verify the deployment by visiting the three URLs:

Documentation site: http://docs.macrozheng.com

Front‑end site: http://mall.macrozheng.com

API documentation: http://api.macrozheng.com/swagger-ui.html

Conclusion : The hands‑on experience shows that NginxConfig can generate high‑performance, secure Nginx configurations without manual editing, making it a convenient tool for developers and operations engineers.

Project repository: https://github.com/digitalocean/nginxconfig.io

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

OperationsDeploymentConfigurationNode.jsvisualization
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.