Nginx configuration generator: Powerful! Nginx configuration online one-click generation “artifact”, not familiar people can go to take a look.


Nginx configuration generator, very powerful, convenient and practical, it is: Nginx webui.

NginxWebUI introduction

NginxWebUI is a convenient and practical web configuration tool. You can use the WebUI to configure various nginx functions, including port forwarding, reverse proxy, SSL certificate configuration, load balancing, and so on. Finally generate the “nginx.conf” configuration file and overwrite the target configuration file. The nginx function is configured.

The address of the project: https://gitee.com/cym1102/nginxWebUI

The official website: https://nginxwebui.gitee.io

NginxWebUI function description

  • The project is a Springboot-based Web system, and the database uses SQLite, so there is no need to install any database on the server.

  • This project can manage multiple NGINx server clusters, at any time one key switch to the corresponding server for NGINx configuration, can also one key to synchronize the configuration of a server to other servers, convenient cluster management.

  • Nginx itself has complex functions. This project cannot cover all the functions of nginx, only common functions can be configured. More advanced functions still need to be manually written in the final generation of nginx.conf.

  • After the deployment of this project, configure nginx no longer need to search the Internet, no longer need to manually apply for and configure SSL certificates, just need to add, delete, change and check in this project can easily configure nginx.

NginxWebUI installation

It can be installed in two ways:
  • One is jar package running

  • One is the Way Docker works

1. Jar package operation mode


The first step is to install the JDK and Nginx environment, which will not be covered here. If you are interested, check out the previous article.


Download the jar package
Wget HTTP: / / https://craccd.oss-cn-beijing.aliyuncs.com/nginxWebUI-1.3.5.jarCopy the code

Start the program

Nohup Java -jar -xmx64m nginxwebui-1.3.5. jar --server.port=8080 ----project.home=/home/ nginxwebui-&Copy the code

Startup parameters:

  • -Xmx64m Maximum number of allocated memory

  • –server.port Occupies the port, starting with port 8080 by default

  • –project.home Specifies the directory for storing database files, certificates, and logs. The default directory is /home/nginxwebu/

Note that the command ends with an ampersand to indicate that the project is running in the background

2. Operation mode of Docker

This project produced a Docker image, including nginx and nginx webui, integrated management and operation of nginx.

First of all, install the Docker operating environment, before the public number has an article introduction, you can go to search and look up.

Download the overall image file:

Docker pull registry.cn-hangzhou.aliyuncs.com/cym1102/nginxwebui:1.3.5Copy the code

Start container:

docker run -itd -v /home/nginxWebUI:/home/nginxWebUI -e BOOT_OPTIONS="-- variable name = variable value -- variable name 2= variable value 2" --privileged=true- net = host registry.cn-hangzhou.aliyuncs.com/cym1102/nginxwebui:1.3.5 / bin/bashCopy the code

Parameter Description:

  • When starting the container, use the –net=host parameter to map the native port directly. Since any port may be used by the internal Nginx, all native ports must be mapped.

  • Container need to map path/home/nginxWebUI: / home/nginxWebUI, this path for a project all data files, including database, nginx configuration files, log, certificate, etc., updates the mirror, this directory to ensure that project data is not lost. Please pay attention to backups.

  • The -e BOOT_OPTIONS parameter can be used to fill in the Java startup parameters. The parameters in the JAR installation tutorial can be used to change the port number

  • Log by default in/home/nginxWebUI/log/nginxWebUI log

Once the installation is complete and started, it is time to access the project through a WEB page.

NginxWebUI usage demo

Enter the address http://serve_ip:8080/ in your browser

The first login, need to initialize the user, enter your user and password, click Add.

After login, the following interface is displayed:

In the HTTP parameter configuration, you can configure the HTTP project of Nginx for HTTP forwarding. By default, several common configurations are provided. Other configurations can be added, deleted, modified and checked freely. You can select enable log tracing to generate log tracing configuration items. The log analysis report of the previous day can be generated at 00:00 every day. Because the log file access.log is too large, only log files of 7 days old are retained by default, but analysis reports can be retained all the time.

In TCP parameter configuration, you can configure nginx steam project parameters for TCP forwarding.

In the reverse proxy, you can configure the nginx reverse proxy, that is, the server function. You can enable the SSL function, upload the PEM file and key file from the web page, or use the certificate obtained in the system. You can directly enable the HTTP to HTTPS function, or enable the HTTP2 protocol.

You can configure nginx load balancing (i.e. upstream) in load balancing and select the configured load balancing target in reverse proxy management.

In HTML static file uploading, you can upload the COMPRESSED HTML package to the specified path. After uploading the compressed HTML package, you can use it in the reverse proxy without uploading the HTML file in Linux.

In certificate management, you can add, issue, and renew certificates. After scheduled renewal is enabled, the system automatically renew certificates that are about to expire.

After the modification is correct, you can overwrite the local conf file and perform verification and restart. You can choose to generate a single nginx.conf file or separate configuration files by domain name in conf.d.

Nginx backup file management, where you can see the backup history version of nginx.cnf, nginx error can choose to roll back to a historical version.

Log management. If log monitoring is enabled in the HTTP configuration, log analysis reports are generated here every day.

Remote server management: If multiple Nginx servers exist, you can deploy the Nginx web user interface (webui), log in to one of the nginx servers, and add the IP addresses, user names and passwords of other servers in the remote management window to manage all nginx servers on one machine.

The one-click synchronization function allows you to synchronize data configuration and certificate files of one server to other servers.

This is how the entire configuration process is used.

From the whole trial process, it is really a very powerful open source tool, and very practical, easy to use to explode!! Here also wall crack recommended to everyone, let everyone say goodbye to the complex configuration process, improve work efficiency, for open source author thumbs up!!

See here, if this article is helpful to you, don’t forget to click on it and forward to share it out!!


Newly organized 2TB dry goods resources, including but not limited to: architect, big data, Docker, operation and maintenance, database, Redis, MongoDB, e-books, Java foundation, Java actual practice project, ELK Stack, machine learning, BAT interview intensive video, etc. Simply reply the keyword: 1024 in the public account dialog box to get all the information for free.