-1

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.

celilo
  • 9
  • 3
  • My advice is: either make your question and test simple enough to be handled by volunteers, or keep making utterly complex test cases relying on many external variables and hire someone to help you troubleshoot that mess. – Gil Jan 23 '13 at 13:57
  • **localhost is a hostname**. You CAN'T use it to match **0.0.0.0** or **192.168.3.101** (like you do in *"192.168.3.101_8080/#localhost"*) because that resolves DIFFERENTLY. Consult the manual (or my first reply below) to see how hosts work. – Gil Jan 25 '13 at 10:45

1 Answers1

0

Using G-WAN v4.18 I used the following structure without problem:

5 host(s): 192.168.2.8:8080
Root:     #192.168.2.8
Alias:     192.168.2.8:#gwan.ch
Virtual:  $trustleap.com
Alias:     192.168.2.8:#gwan.com
Virtual:  $secure.gwan.ch

The hosts were defined on a LAN with /etc/hosts which is atomic (changes are immediately reflected).

As expected, they are all reachable from the Internet browser, and display the expected documents.

Note that unlike in your report, there's no such a thing like Root: #gwan.ch (the alias is reported as expected: Alias: 192.168.2.8:#gwan.com).

I suggest that (1) you make sure you are using v4.18 (today's latest release) and (2) test your configuration with /etc/hosts so you don't have possible DNS issues.

Gil
  • 3,279
  • 1
  • 15
  • 25
  • Thanks for your response Gil. I appended my question. Please begin reading at the "Additional research" section if you have an opportunity to further address. I have performed additional testing and believe that there is a valid issue.
    [Wed Jan 23 09:05:52 2013 GMT] G-WAN 4.1.18 64-bit (Jan 18 2013 12:20:49)
    – celilo Jan 23 '13 at 09:47
  • If you want a reply, try to make a test case that OTHERS CAN DUPLICATE EASILY. – Gil Jan 23 '13 at 13:58
  • Actually I apologize. I did a search and replace on a section of text where a global replace occurred. I'll fix the question as soon as I get the chance. – celilo Jan 24 '13 at 01:03
  • I have simplified the above test documentation, correcting my error in the process, which I understand must have been extremely confusing. Again, I apologize...So much for 3:00am posts:) My example that fails is essentially the same as yours that succeeds. I eliminated the virtual hosts as they added unnecessarily to the clutter. The alternate configs are simply to demonstrate the inconsistent handing of aliases by gwan in my environment. All of these tests use the default gwan configuration with only changes to the listener, root, and aliases. – celilo Jan 24 '13 at 04:27
  • One last note. I went back and replicated my scenario in "G-WAN 3.3.3 64-bit (built: Mar 3 2012 14:20:49)". It works perfectly, so, there have definitely been changes in the aliasing code since that time. – celilo Jan 24 '13 at 04:41
  • **localhost**, as a hostname, CAN'T be used to match **0.0.0.0** or **192.168.3.101** (like you do in *"0.0.0.0_8080/#localhost"* or in *"192.168.3.101_8080/#localhost"*) because it resolves DIFFERENTLY. Consult the manual (or my first reply below) to see how hosts work. – Gil Jan 25 '13 at 10:47