Feature: Nginx: Allow to specify listen options #555

Closed
opened 2026-04-05 16:20:31 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @JulesdeCube on 2/7/2025

Motivation

All OneUptime's services are now ipv6 friendly except Nginx that still listen only on IPv4. This PR finish the work done on #1773 and #1807.

Description

This PR allow to modify nginx's listen address and options to be able to listen on dual and ipv6 only network stack.

It introduce the NGINX_LISTEN_ADDRESS and NGINX_LISTEN_OPTIONS environmental variable inside the nginx configuration template so modify both parameter.

This PR don't change the current behaviors.

Example

IPv6 only:

NGINX_LISTEN_ADDRESS=[::]:
NGINX_LISTEN_OPTIONS=

dual stack:

NGINX_LISTEN_ADDRESS=[::]:
NGINX_LISTEN_OPTIONS=ipv6only=off

Pull Request Checklist:

  • Please make sure all jobs pass before requesting a review.
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).
  • Have you lint your code locally before submission?
  • Did you write tests where appropriate?

#1348
#1773
#1807

*Originally created by @JulesdeCube on 2/7/2025* ### Motivation All OneUptime's services are now ipv6 friendly except Nginx that still listen only on IPv4. This PR finish the work done on #1773 and #1807. ### Description This PR allow to modify nginx's listen address and options to be able to listen on dual and ipv6 only network stack. It introduce the `NGINX_LISTEN_ADDRESS` and `NGINX_LISTEN_OPTIONS` environmental variable inside the nginx configuration template so modify both parameter. This PR don't change the current behaviors. ### Example IPv6 only: ```env NGINX_LISTEN_ADDRESS=[::]: NGINX_LISTEN_OPTIONS= ``` dual stack: ```env NGINX_LISTEN_ADDRESS=[::]: NGINX_LISTEN_OPTIONS=ipv6only=off ``` ### Pull Request Checklist: - [ ] Please make sure all jobs pass before requesting a review. - [X] Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). - [X] Have you lint your code locally before submission? - [X] Did you write tests where appropriate? ### Related Issues #1348 #1773 #1807
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#555