G-WAN v7.12.6 can't visit the static contents

345 views Asked by At

G-WAN out-of-box is running no problem with the dynamic contents but can't visit the static contents.
I ran G-WAN with kk user(not root, no sudo). All files and directories are of kk user/group. I installed it in localhost. When I typed 127.0.0.1:8080 in the browser, it returned: Server not found Firefox can't find the server at www.index.html.
It is strange that the returned server name was www.index.html
When I typed 127.0.0.1:8080/index.html, it returned 404 file not found.

How can I workaround these, until a new release is out?
This time, there is no error message in the log file. (I installed G-WAN in Ubuntu 15.10)

UPDATE: ------------------------
There are two strange info from the served_from.c, as below:

This page was processed...

Using get_env():

by the Server:    0.0.0.0:8080:8080(hostname: 127.0.0.1)
                  ^^^^^^^^^^^^^^^^^(Should it be only one '8080'?)
Virtual Host:     /home/kk/dev/gwan_v7.12.6/0.0.0.0:8080/#0.0.0.0
HTTP method:      GET
HTTP request:     /?served_from
HTTP query:       served_from
HTTP entity:      (null)
Content-Encoding: 0
Content-Length:   0
Content-Type:     0
for the Client:   127.0.0.1:43199
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0


Using HTTP Headers to get the same information:

by the Server:    27.0.0.1:8080 (hostname: 27.0.0.1)
                  ^^^^^^^^^^^^^(Should it be 127.0.0.1 ?
                  The leading '1' is missing.)
HTTP method:      GET
HTTP entity:      -
Content-Encoding: 0
Content-Length:   0
Content-Type:     0
for the Client:   127.0.0.1:43199
ozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Acpt-Language:    n-US,en;q=0.5
Acpt-Encoding:    3: |GZIP|DEFLATE
Cookies:          -

Is there anything wrong in v7.12.6?

UPDATE 2 ================================
with the following steps, G-WAN v7.12.6 can't show static contents:
1. all files and directories are of the same user/group (i.e. kk)
2. out-of-box, listen to 8080
3. run ./gwan
cannot visit static contents.

with following changes, G-WAN works normally:
1. change directory 0.0.0.0.8080 to 0.0.0.0:80
2. run sudo ./gwan -d:kk:kk
everything is normal.

sorry for my mis-typing in the UPDATE2. It should be 0.0.0.0:80 (emphasize the colon). Actually, I typed it right in the directory name. Repeat: ./gwan should work according to G-WAN's document, since the user launching the program is owning all the files and directories.

1

There are 1 answers

7
Gil On

If you can query the server for scripts then G-WAN is running fine. The problem is obviously a file permission issue, hence the error 404 file not found you got for the query 127.0.0.1:8080/index.html.

This system configuration problem will affect any program, not specifically G-WAN. Consult our dedicated FAQ to find how to correct it.

For the served_from.c script, feel free to display the IP address in the "correct" order and to cut the string at the expected position to avoid the listener port repetition.


UPDATE:

Your latest update says "changing directory 0.0.0.0.8080 to 0.0.0.0:80 works". This was the problem: "0.0.0.0.8080" has never been a valid syntax for G-WAN.