phpfm
phpfm copied to clipboard
cannot view some files in nginx with regex server names
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
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;
# [...]
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'];