Skip to content

Can u add custom path #8632

Open
Open

Description

@Apachiil

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to request a feature or enhancement and not ask a question

The problem

Can u add custom path to panel?

Like: SITE:PANEL_PORT/dns/ ?

Proposed solution

Now I use this on nginx

# === === AH === ===
location = /dns {
    return 301 https://$host/dns/;
}

location /dns/ {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    
    proxy_pass http://127.0.0.1:2099/;
    
    # proxy_redirect / /dns/;
    proxy_redirect ~^https?://[^/]+/(.*)$ https://$host/dns/$1;
    proxy_redirect ~^/(.*)$ https://$host/dns/$1;
    
    sub_filter_once off;
    # sub_filter '<head>' '<head><base href="/dns/">';
    sub_filter 'href="/' 'href="/dns/';
    sub_filter 'src="/' 'src="/dns/';
}

Alternatives considered and additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions