Skip to content

Show nginx config errors for proxy hosts - #5916

Open
PrassanthVG wants to merge 1 commit into
NginxProxyManager:developfrom
PrassanthVG:fix/proxy-host-offline-status
Open

PrassanthVG wants to merge 1 commit into
NginxProxyManager:developfrom
PrassanthVG:fix/proxy-host-offline-status

Conversation

@PrassanthVG

Copy link
Copy Markdown
Contributor

When nginx rejected a proxy host config (e.g. unresolvable custom location host) the host was taken offline silently: create returned stale meta, the status column only reflected the enabled flag and the save showed success. Return the fresh meta, show Offline with the nginx error in the table, and show the error on save.

Fixes #5883

Why

Fixes #5883. When nginx rejects a proxy host config (e.g. a custom location with an unresolvable host), the host is taken offline but the UI gave no indication:

  • create returned the meta from before nginx was configured
  • the Status column only reflected enabled
  • saving always showed success

Now create returns the fresh meta, the Status column shows Offline (with the nginx error on hover), and saving shows the nginx error.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

AI Usage

  • AI was used to write this

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • API changes
  • Performance improvement
  • Test addition or update

AI Usage

  • AI was used to write this
  • AI was used to review this

When nginx rejected a proxy host config (e.g. unresolvable custom
location host) the host was taken offline silently: create returned
stale meta, the status column only reflected the enabled flag and the
save showed success. Return the fresh meta, show Offline with the nginx
error in the table, and show the error on save.

Fixes NginxProxyManager#5883
@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Shows nginx configuration errors in the proxy host UI.

The PR appears safe to merge, with a non-blocking accessibility improvement needed for the table’s error detail.

Findings

  1. P2 Error only available on hover ▶

Summary

The PR returns fresh nginx metadata when creating a proxy host and uses it to report rejected configurations in the save notification and host table.

  • The error detail in the table needs a keyboard- and touch-accessible presentation.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Save proxy host] --> B[Configure and test nginx]
  B --> C[Persist and return nginx metadata]
  C --> D[Show save notification]
  C --> E[Refresh proxy-host table status]
Loading

Reviews (1) · Last reviewed commit: "Show nginx config errors for proxy hosts"

cell: (info: any) => {
return <TrueFalseFormatter value={info.getValue()} trueLabel="online" falseLabel="offline" />;
return (
<span title={info.row.original.meta?.nginxErr || undefined}>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Error only available on hover The nginx error is placed in a title tooltip on a span that cannot receive keyboard focus. After the save dialog closes and its notification disappears, keyboard and touch users cannot reliably read why the host is offline. Please make the error accessible from the table without requiring a mouse.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@jc21

jc21 commented Oct 5, 2026

Copy link
Copy Markdown
Member

CI is failing in the cypress test suite:

06:53:28  cypress-1  | [Backend API] POST /api/nginx/proxy-hosts
06:53:29  cypress-1  | [Backend API] Response data: {
06:53:29  cypress-1  |   id: 2,
06:53:29  cypress-1  |   created_on: '2026-10-02 06:53:28',
06:53:29  cypress-1  |   modified_on: '2026-10-02 06:53:28',
06:53:29  cypress-1  |   owner_user_id: 5,
06:53:29  cypress-1  |   domain_names: [ 'test.example.com' ],
06:53:29  cypress-1  |   forward_host: '1.1.1.1',
06:53:29  cypress-1  |   forward_port: 80,
06:53:29  cypress-1  |   access_list_id: 0,
06:53:29  cypress-1  |   certificate_id: 0,
06:53:29  cypress-1  |   ssl_forced: false,
06:53:29  cypress-1  |   caching_enabled: false,
06:53:29  cypress-1  |   block_exploits: false,
06:53:29  cypress-1  |   advanced_config: '',
06:53:29  cypress-1  |   meta: { dns_challenge: false, nginx_online: true, nginx_err: null },
06:53:29  cypress-1  |   allow_websocket_upgrade: false,
06:53:29  cypress-1  |   http2_support: false,
06:53:29  cypress-1  |   forward_scheme: 'http',
06:53:29  cypress-1  |   enabled: true,
06:53:29  cypress-1  |   locations: [],
06:53:29  cypress-1  |   hsts_enabled: false,
06:53:29  cypress-1  |   hsts_subdomains: false,
06:53:29  cypress-1  |   trust_forwarded_proto: false,
06:53:29  cypress-1  |   certificate: null,
06:53:29  cypress-1  |   owner: {
06:53:29  cypress-1  |     id: 5,
06:53:29  cypress-1  |     created_on: '2026-10-02 06:53:27',
06:53:29  cypress-1  |     modified_on: '2026-10-02 06:53:27',
06:53:29  cypress-1  |     is_disabled: false,
06:53:29  cypress-1  |     email: 'cypress@example.com',
06:53:29  cypress-1  |     name: 'Cypress McGee',
06:53:29  cypress-1  |     nickname: 'Cypress',
06:53:29  cypress-1  |     avatar: '//www.gravatar.com/avatar/cd134eedbd3587ca0586e736cee088dd?default=mm',
06:53:29  cypress-1  |     roles: [ 'admin' ]
06:53:29  cypress-1  |   },
06:53:29  cypress-1  |   access_list: null
06:53:29  cypress-1  | }
06:53:29  cypress-1  |     1) Should be able to create a http host
06:53:29  cypress-1  | 
06:53:29  cypress-1  | 
06:53:29  cypress-1  |   0 passing (1s)
06:53:29  cypress-1  |   1 failing
06:53:29  cypress-1  | 
06:53:29  cypress-1  |   1) Proxy Hosts endpoints
06:53:29  cypress-1  |        Should be able to create a http host:
06:53:29  cypress-1  | 
06:53:29  cypress-1  |       AssertionError: expected 'boolean' to equal 'undefined'
06:53:29  cypress-1  |       + expected - actual
06:53:29  cypress-1  | 
06:53:29  cypress-1  |       -'boolean'
06:53:29  cypress-1  |       +'undefined'
06:53:29  cypress-1  |       
06:53:29  cypress-1  |       at Context.eval (webpack:///../e2e/api/ProxyHosts.cy.js:44:47)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding custom location with inexistent host fails silently

2 participants