Nginx Per Server Settings

Nginx is a lightweight open-source web server, and servers running Nginx will automatically inherit Global Application settings. In addition to the general settings, Nginx provides specific configurations that can be customized:

  1. php-fpm Settings

    • Inherited php.ini settings from the global configuration can be overridden or custom directives can be added for a specific server.
    • To customize, navigate to Servers > select the server > Manage > Roles > Application tab > php settings to add or edit directives.
  2. Virtual Host Includes

    • You can add custom configurations to a virtual host by editing the file at /var/local/enhance/nginx/vhost_includes/example.com.conf (replace example.com with the actual domain).
    • These configurations will apply to both the http and https server blocks.
    • Be cautious as incorrect syntax may cause the web server to fail.
  3. ModSecurity

    • ModSecurity can be enabled or disabled through the Enhance control panel. The OWASP ruleset is enabled by default, offering protection against vulnerabilities like SQL injection and XSS.
    • To enable ModSecurity: Servers > Manage > Roles > Application tab > ModSecurity toggle ON or OFF.
  4. Custom Configuration (nginx.conf)

    • Direct edits to the primary nginx.conf file are not possible as changes will be lost on updates.
    • For custom Nginx configurations, use the Virtual Host Includes method as described above.
Was this answer helpful? 0 Users Found This Useful (0 Votes)