Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#60582 new feature request

Let WordPress multisite network setup be aware of Nginx Unit as a hosting environment

Reported by: javorszky's profile javorszky Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 6.5
Component: Networks and Sites Keywords: needs-docs has-patch
Focuses: docs, administration, multisite Cc:

Description

Hi there,

I work at F5 on the NGINX Unit team. I'd like to get WordPress to recognise when it's running behind a Unit environment, much like Apache, IIS, and Nginx proper, looking at the server header is sufficient for this. I already have a proof of concept locally with the required code changes.

With that, I'd also like to help with adding configuration documentation to the handbook, and to help getting an official Unit-based docker container created as well.

There are a few prerequisites that we still need to take care of on our (NGINX Unit) side, however here are all the references for work we already have:

I'd like to start the conversation about adding a section to the handbook for Unit configurations like how NGINX has its own: https://developer.wordpress.org/advanced-administration/server/web-server/nginx/.

I'd like help validating that Unit can handle all instances of multisite and single site functionality in a way that is expected.

Let me know how else I can help. You can also find me in the WordPress Slack during normal working hours GMT.

Thanks,
Gabor

Change History (4)

#1 @swissspidy
3 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

I already have a proof of concept locally with the required code changes.

Updating the $is_nginx detection in wp-includes/vars.php sounds reasonable. I assume that's what your code change does? If so, feel free to submit a PR against https://github.com/WordPress/wordpress-develop/ to reason about.

PR to the WordPress docker library adding Unit

Just for the record, that project is not maintained by the WordPress project, but by the Docker community.

For help with Multisite testing, #core-multisite on Slack would be a good starting point.

Once things are working, #docs is a good starting point for documentation. See also https://make.wordpress.org/docs/handbook/.

#2 @javorszky
3 months ago

Created a PR in the github mirror per the docs on the ticket, which was auto-closed and not linked to here. It's https://github.com/WordPress/WordPress/pull/692, it has the code changes.

Updating the $is_nginx detection in wp-includes/vars.php sounds reasonable. I assume that's what your code change does?

I have to add a new global variable. NGINX and NGINX Unit are configured differently, which also means the existing NGINX page also can't be reused for Unit. This is also the reason we need to validate that multisite works correctly.

Thank you for the pointers to the docs and multisite channels, as well as the info about the docker images.

Version 1, edited 3 months ago by javorszky (previous) (next) (diff)

This ticket was mentioned in PR #6147 on WordPress/wordpress-develop by javorszky.


3 months ago
#3

  • Keywords has-patch added; needs-patch removed
  • Adds new global variable $is_nginx_unit
  • Checks server header for Unit/ to determine whether the server environment is NGINX Unit
  • Links to a documentation page that does not exist yet

Trac ticket: Let WordPress multisite network setup be aware of Nginx Unit as a hosting environment

This ticket was mentioned in Slack in #docs by javorszky. View the logs.


3 months ago

Note: See TracTickets for help on using tickets.