Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Additional Nginx Configurations Inside the server Block for Easier Customization #29

Closed
erseco opened this issue Nov 7, 2024 · 0 comments · Fixed by #30
Closed
Assignees
Labels
enhancement New feature or request

Comments

@erseco
Copy link
Owner

erseco commented Nov 7, 2024

Currently, the Nginx configuration in this container includes a directive to load additional configurations via:

# Include other server configs
include /etc/nginx/conf.d/*.conf;

However, this is outside of the main server block. For increased flexibility and to allow easy addition of rules specific to Nginx servers, it would be useful to support loading configurations directly inside the server block. This enhancement would facilitate customizing server behavior without modifying the main configuration file.

Proposed Solution:

  1. Add an additional include directive within the server block, similar to:
    # Include additional server-specific configurations
    include /etc/nginx/server-conf.d/*.conf;
  2. Create a directory /etc/nginx/server-conf.d/ for placing custom configuration files.
  3. Update documentation to reflect this change and instruct users on how to utilize the new include directive for server-specific configurations.

Benefits:

  • Simplifies customization of Nginx servers.
  • Provides a more modular approach to managing configuration changes.
  • Reduces the need to directly modify the main nginx.conf file.

Potential Risks:

  • Ensure proper error handling to avoid potential issues with misconfigured files.
  • Properly validate configurations before including them to maintain server stability.
@erseco erseco added the enhancement New feature or request label Nov 7, 2024
@erseco erseco self-assigned this Nov 7, 2024
@erseco erseco closed this as completed in #30 Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant