I have two host alias in my directory structure that fail to properly register with g-wan. My folder structure is as follows:
/srv/gwan_linux64-bit/192.168.3.101_80/$dg.lcl
/srv/gwan_linux64-bit/192.168.3.101_80/$myapp
/srv/gwan_linux64-bit/192.168.3.101_80/#192.168.3.101
/srv/gwan_linux64-bit/192.168.3.101_80/#192.168.3.101:gwan.klickitat.lcl
/srv/gwan_linux64-bit/192.168.3.101_80/#192.168.3.101:test.lcl
When starting g-wan, I receive the error:
loading......... * unresolved aliases: 2
From the sample server report in the default g-wan configuration:
Listeners
5 host(s): 192.168.3.101_80
Virtual: $dg.lcl
Root: #test.lcl
Root: #gwan.klickitat.lcl
Virtual: $myapp
Root: #192.168.3.101
As you can see, g-wan identifies the two root aliases as additional roots. G-wan only allows a single root host, so the two alias fail to function in the browser with a 404 error. Each of the hosts respond properly to ping, so they are accounted for by the dns. The virtual hosts and root host function as expected.
Thoughts?
Additional research:
I have corrected my posting error and simplified the presentation. I hope that you will find this to be concise.
My hosts file is as follows for all tests:
127.0.0.1 localhost.klickitat.lcl localhost
192.168.3.101 gwan.klickitat.lcl test.lcl
I implemented an example that is identical to your test with the exception that I used a different IP address to match my local subnet and I eliminated the virtual hosts, which do not impact my result in my testing.
The only changes to the default gwan configuration are as follows:
- Changed the listener from 0.0.0.0_8080 to 192.168.3.101_8080
- Changed the root host IP from #0.0.0.0 to #192.168.3.101
- Added two host aliases #192.168.3.101:gwan.klickitat.lcl and #192.168.3.101:test.lcl
This is my folder structure:
/srv/gwan_linux64-bit/192.168.3.101_8080
/srv/gwan_linux64-bit/192.168.3.101_8080/#192.168.3.101
/srv/gwan_linux64-bit/192.168.3.101_8080/#192.168.3.101:gwan.klickitat.lcl
/srv/gwan_linux64-bit/192.168.3.101_8080/#192.168.3.101:test.lcl
This is my result as reported by gwans included server report application:
3 host(s): 192.168.3.101_8080
Root: #test.lcl
Root: #gwan.klickitat.lcl
Root: #192.168.3.101
Gwan does not recognize the aliases and I cannot access the aliased urls. My result is inconsistent with yours.
The rest of this post is intended only to illustrate that aliases are reported by gwan in alternate configurations in my environment, but with some inconsistencies in the expected outcome. I simply identify the folder structure and my result.
Alternate Config 1
/srv/gwan_linux64-bit/0.0.0.0_8080
/srv/gwan_linux64-bit/0.0.0.0_8080/#localhost
/srv/gwan_linux64-bit/0.0.0.0_8080/#localhost:gwan.klickitat.lcl
/srv/gwan_linux64-bit/0.0.0.0_8080/#localhost:test.lcl
Result:
3 host(s): 0.0.0.0_8080
Root: #localhost
Alias: 0.0.0.0:#gwan.klickitat.lcl
Alias: 0.0.0.0:#test.lcl
Alternate Config 2
/srv/gwan_linux64-bit/192.168.3.101_8080
/srv/gwan_linux64-bit/192.168.3.101_8080/#localhost
/srv/gwan_linux64-bit/192.168.3.101_8080/#localhost:gwan.klickitat.lcl
/srv/gwan_linux64-bit/192.168.3.101_8080/#localhost:test.lcl
Result:
3 host(s): 192.168.3.101_8080
Root: #localhost
Alias: 192.168.3.101:#gwan.klickitat.lcl
Alias: 192.168.3.101:#test.lcl
While the alternate configurations function, note that the aliases naming varies from the explicit naming in the folder structure. It appears that the listeners are being properly set up, but that there is some issue in how the host laiases are being generated. I'm happy to test further if you so desire.