Web GUI folder configuration
-
- Posts: 8
- Joined: Sat Apr 10, 2021 12:31 pm
Web GUI folder configuration
hi,
with default settings the web UI browser access is like that
http://127.0.0.1:51000
but i want something like that:
http://127.0.0.1:51000/MyWebGui
how to setup such a folder-structure? (in apache i would create an alias in the config...)
with default settings the web UI browser access is like that
http://127.0.0.1:51000
but i want something like that:
http://127.0.0.1:51000/MyWebGui
how to setup such a folder-structure? (in apache i would create an alias in the config...)
Re: Web GUI folder configuration
Hi!
I can't check it right now, but whether some custom GUI works not on:
http://127.0.0.1:51000/MyWebGui/my_index.html ?
If it works, you are asking for afserver to provide some index.html, if just folder specified?
I can't check it right now, but whether some custom GUI works not on:
http://127.0.0.1:51000/MyWebGui/my_index.html ?
If it works, you are asking for afserver to provide some index.html, if just folder specified?
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
-
- Posts: 8
- Joined: Sat Apr 10, 2021 12:31 pm
Re: Web GUI folder configuration
i refer to afserver and its configuration in "../afanasy/config_default.json".
afserver always looks into "../afanasy/browser/index.html" (hardcoded?) and sets this as a httpd root-directory...
i.e. if i move the "browser" folder to other location like "..MyWebGui/browser/", i cant define "../MyWebGui/" as a httpd root directory, so that in firefox the adress looks like "http://server_ip/browser/"...hope its clear what i mean...
afserver always looks into "../afanasy/browser/index.html" (hardcoded?) and sets this as a httpd root-directory...
i.e. if i move the "browser" folder to other location like "..MyWebGui/browser/", i cant define "../MyWebGui/" as a httpd root directory, so that in firefox the adress looks like "http://server_ip/browser/"...hope its clear what i mean...
Re: Web GUI folder configuration
Aserver httpd root folder is the entire CGRU root folder, and can't be other, as some scripts and icons are global (used by various cgru tools, not only web gui).
If get request is empty it returns /afanasy/browser/index.html - this is hardcoded, but it is not a big deal to make it configurable.
But the entire root folder is configurable:
https://github.com/CGRU/cgru/blob/maste ... t.json#L13
If get request is empty it returns /afanasy/browser/index.html - this is hardcoded, but it is not a big deal to make it configurable.
But the entire root folder is configurable:
https://github.com/CGRU/cgru/blob/maste ... t.json#L13
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
-
- Posts: 8
- Joined: Sat Apr 10, 2021 12:31 pm
Re: Web GUI folder configuration
i see...
my intension was to serve the WebGui over the internet, so users can reach the WebGui in a browser-adress like "http://www.host.com:51000/WebGui/index.html"
and NOT "http://www.host.com:51000", since "host.com" has also several internet pages to show...
my intension was to serve the WebGui over the internet, so users can reach the WebGui in a browser-adress like "http://www.host.com:51000/WebGui/index.html"
and NOT "http://www.host.com:51000", since "host.com" has also several internet pages to show...
Re: Web GUI folder configuration
Now i does not see... ))
Why now you can't use http://www.host.com:51000/WebGui/index.html ?
Why now you can't use http://www.host.com:51000/WebGui/index.html ?
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
-
- Posts: 8
- Joined: Sat Apr 10, 2021 12:31 pm
Re: Web GUI folder configuration
???
i think we misunderstood...
i try to explain:
by default the Web Interface is configured that it looks to "../afanasy/browser/index.html", wich is the dokument root of the WebGui...
this is mapped for a internet-browser so that the adress looks like "http://www.host.com:51000"
when i change the "af_http_serve_dir" to "c:/xxx/xxx" then it looks to "../xxx/xxx/afanasy/browser/index.html" but is also mapped to "http://www.host.com:51000". (btw. this doesnt work, because i cant move the browser folder to other location...)
so i need something like an alias folder wich has a name i.e. "MyWebGui" and looks into ""../afanasy/browser/" as the dokument root, so it can map the adress to "http://www.host.com:51000/MyWebGui"
i think we misunderstood...
i try to explain:
by default the Web Interface is configured that it looks to "../afanasy/browser/index.html", wich is the dokument root of the WebGui...
this is mapped for a internet-browser so that the adress looks like "http://www.host.com:51000"
when i change the "af_http_serve_dir" to "c:/xxx/xxx" then it looks to "../xxx/xxx/afanasy/browser/index.html" but is also mapped to "http://www.host.com:51000". (btw. this doesnt work, because i cant move the browser folder to other location...)
so i need something like an alias folder wich has a name i.e. "MyWebGui" and looks into ""../afanasy/browser/" as the dokument root, so it can map the adress to "http://www.host.com:51000/MyWebGui"
Re: Web GUI folder configuration
So, if you could configure what afserver should return on an empty request (now it is build in):
https://github.com/CGRU/cgru/blob/maste ... nasy.h#L49
It will fit your needs?
You what to configure any site root location and to return just index.html (not /afanasy/browser/index.html)?
Or misunderstanding again? ))
https://github.com/CGRU/cgru/blob/maste ... nasy.h#L49
It will fit your needs?
You what to configure any site root location and to return just index.html (not /afanasy/browser/index.html)?
Or misunderstanding again? ))
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
-
- Posts: 8
- Joined: Sat Apr 10, 2021 12:31 pm
Re: Web GUI folder configuration
i think you misunderstand...(or maybe i misunderstand?)
but this can be override at the moment with "af_http_serve_dir" in the config, right?
nevertheless whatever i will put inside it will always return the "root" internet-adress "http://host:51000" and NOT a subfolder like "http://host:51000/SubFolder/"
(i mean i want to reach the index.html from a subfolder inside the internet-browser...)
in apache httpd.conf there is the ability to configure a root-dir (which is accessed as "http://host:80") AND a alias folder i.e. named WebGUI (which is accessed as "http://host:80/WebGUI")
but this can be override at the moment with "af_http_serve_dir" in the config, right?
nevertheless whatever i will put inside it will always return the "root" internet-adress "http://host:51000" and NOT a subfolder like "http://host:51000/SubFolder/"
(i mean i want to reach the index.html from a subfolder inside the internet-browser...)
in apache httpd.conf there is the ability to configure a root-dir (which is accessed as "http://host:80") AND a alias folder i.e. named WebGUI (which is accessed as "http://host:80/WebGUI")
Re: Web GUI folder configuration
It will return any location w/o any change, for example http://host:51000/SubFolder/
But on empty location http://host:51000 it returns http://host:51000/afanasy/browser/index.html
AfServer is not Apache, it is just a 177 code lines web server:
https://github.com/CGRU/cgru/blob/maste ... ttpget.cpp
( the simplest, i think )
But on empty location http://host:51000 it returns http://host:51000/afanasy/browser/index.html
AfServer is not Apache, it is just a 177 code lines web server:
https://github.com/CGRU/cgru/blob/maste ... ttpget.cpp
( the simplest, i think )
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).