Skip to content

Bug Report: deny all; directive persists in proxy host configuration #5287

@ppetermans

Description

@ppetermans

Description: There is an issue where a deny all; directive is automatically added or persists in the generated Nginx configuration file (e.g., data/nginx/proxy_host/3.conf), preventing any traffic from reaching the backend even when access is set to "Public".

Steps to Reproduce:

Create a new Proxy Host in the admin interface.

Configure it to forward traffic to a local or internal service.

Save the configuration.

Check the generated .conf file in the /data/nginx/proxy_host/ directory.

Expected Behavior: The configuration should only include deny all; if specific access restrictions are set. If the host is public, this directive should be absent or commented out.

Actual Behavior: The deny all; directive is present, causing a "403 Forbidden" error for all external users. The only way to fix it is to manually run: sed -i 's/deny all;/#deny all;/g' /data/nginx/proxy_host/3.conf && nginx -s reload

Environment:

Image: jc21/nginx-proxy-manager:latest

OS: Windows 10/11 (using Docker Desktop / WSL2)

Docker Compose:

YAML
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
container_name: nginx-proxy-manager
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions