Back to Changelog
v1.0.311
Fixed a critical web-server switch bug that caused 502 errors when switching domain web-server mode back to Nginx+Apache.
Improvement
1- Web-server switch (PATCH /domains/:id/web-server) now correctly regenerates nginx vhost from the committed, up-to-date domain values — verified across all 7 switch-direction combinations (nginx, nginx_apache, apache, panelica).
Bug Fixes
2- Fixed off-by-one bug in web-server mode switch: changing a domain from Nginx-only or Panelica mode back to Nginx+Apache (default) was regenerating nginx config from a stale database read (before the transaction committed), causing the vhost to be written with the previous mode's settings and proxying to the wrong port — resulting in 502 errors.
- Split ModSecurity config regeneration into two code paths: the in-flight path now uses the in-memory domain struct (not yet committed) so nginx vhost and modsec config always reflect the newly selected web-server mode.