Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot view some files in nginx with regex server names #19

Open
atesin opened this issue Jun 15, 2019 · 1 comment
Open

cannot view some files in nginx with regex server names #19

atesin opened this issue Jun 15, 2019 · 1 comment

Comments

@atesin
Copy link

atesin commented Jun 15, 2019

i have nginx with regex server names (to capture subdomain name for later use) so i can automatically support a document root for each subdomain with a single conf

in some document root folders, when i click "view" in any file (any type), it fails to guess the path and showing it... note other actions like edit, rename, etc. work flawlessly

01

02

this is a portion of my virtual server conf file, note the "subdomain" captured variable (also see nginx documentation: http://nginx.org/en/docs/http/server_names.html#regex_names)

# [...]
server {
    listen       80;
    server_name  ~^(?<subdomain>.*)\.netgamer\.cl$;

    root   /srv/netgamer/$subdomain;
    index  index.php index.html index.htm;
# [...]
@atesin atesin changed the title cannot view some files with nginx regex server name cannot view some files in nginx with regex server name Jun 15, 2019
@atesin atesin changed the title cannot view some files in nginx with regex server name cannot view some files in nginx with regex server names Jun 15, 2019
@atesin
Copy link
Author

atesin commented Jun 23, 2020

hi.. any update about this issue? .. is really annonyng
currently is the only bug that holds me to switch from extplorer

UPDATE: for me a patch that "seems" to worked was to replace all "SERVER_NAME" occurences (4) by "HTTP_HOST" ... in version 1.7.9, github commit 48db9e0 from 29 abr 2020 (grep -n SERVER_NAME index.php) ... could test more deeeply to include it in next release

before:

202:    if (strlen($_SERVER['SERVER_NAME'])) $url .= $_SERVER['SERVER_NAME'];
4677:        $pageURL .= $_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'].$_SERVER['REQUEST_URI'];
4679:        $pageURL .= $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

after:

202:    if (strlen($_SERVER['HTTP_HOST'])) $url .= $_SERVER['HTTP_HOST'];
4677:        $pageURL .= $_SERVER['HTTP_HOST'].":".$_SERVER['SERVER_PORT'].$_SERVER['REQUEST_URI'];
4679:        $pageURL .= $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

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

No branches or pull requests

1 participant