Nginx logs are crucial for monitoring, troubleshooting, and maintaining your web server. They provide valuable insights into server performance, user behavior, and potential issues.
This option is used to set the path for Nginx error logs in Nginx UI, allowing us to view log content online.
::: tip Tip
In Nginx UI v2, we parse the output of the `nginx -V` command to get the default path for Nginx error logs.
If you need to set a different path, you can use this option.
:::
## Service Monitoring and Control
In this section, we will introduce configuration options in Nginx UI for monitoring and controlling Nginx services.
### ConfigDir
- Type: `string`
This option is used to set the path for the Nginx configuration folder.
In Nginx UI v2, we parse the output of the `nginx -V` command to get the default path for the Nginx configuration file.
If you need to override the default path, you can use this option.
### PIDPath
- Type: `string`
This option is used to set the path for the Nginx PID file. Nginx UI determines the running status of the Nginx service by checking if this file exists.
In Nginx UI v2, we parse the output of the `nginx -V` command to get the default path for the Nginx PID file.
If you need to override the default path, you can use this option.
### TestConfigCmd
- Type: `string`
- Default: `nginx -t`
This option is used to set the command for testing the Nginx configuration.
### ReloadCmd
- Type: `string`
- Default: `nginx -s reload`
This option is used to set the command for reloading the Nginx configuration.
### RestartCmd
- Type: `string`
::: tip Tip
We recommend users who manage Nginx with systemd to set this value to `systemctl restart nginx`.
Otherwise, after restarting Nginx in the Nginx UI, you will not be able to get the accurate status of Nginx in systemctl.
:::
If this option is left empty, Nginx UI will use the following command to stop the Nginx service: