Skip to content

Nginx ​

Nginx is the default web server when you create a server in FlashPanel. Each server uses one web server only: Nginx, Apache, or OpenLiteSpeed.

This page covers managing Nginx at the server level. To add redirects, password-protect a site, or insert configuration for a single website, see Web server configuration (Nginx/Apache).

Install and uninstall ​

Nginx is managed as an application on the server's Applications page:

  • Install: open the Not Installed tab, find Nginx, and click the Install button (download icon).
  • Uninstall: on the Installed tab, click the Uninstall button (trash icon) for Nginx and confirm.

WARNING

Uninstalling Nginx takes every website on the server offline until you install a web server again.

Start, restart, stop ​

Open the Applications page, find the Nginx row on the Installed tab, and use the buttons in the action column:

  • Start, Restart, Stop: control the Nginx service. The current status is shown next to the application name.
  • Update: only appears when a new Nginx version is available.
  • The switch in the Auto Restart column: automatically restarts Nginx if the service stops unexpectedly.

The same buttons are also available at the top right of each website's Nginx > Configuration page.

View global configuration files and logs ​

On the Nginx row of the Applications page:

  • Click the Config button (gear icon) to open the global configuration folder /etc/nginx in the file manager.
  • Click the Log button to open the global log folder /var/log/nginx.

WARNING

Avoid editing a website's configuration files in /etc/nginx directly: FlashPanel overwrites those changes on the next configuration sync. Use the website's Web server configuration page instead.

Upload size limit and timeout ​

When you change the Max File Upload Size or Max Execution Time on the PHP page, FlashPanel automatically updates the matching Nginx limits (maximum request size and PHP timeout) and reloads Nginx. You don't need to edit the Nginx configuration by hand.

Nginx fails to start ​

  1. Open the server's Events page to see the error from the latest operation.
  2. If the error comes from a website's configuration block, open that website's Web server configuration page, fix or delete the block you just added, then click Sync.
  3. Click Restart for Nginx on the Applications page.

See also Troubleshooting.