How to log Host header in web 6.1SPx
Wednesday Nov 05, 2008
If you need to see the incoming request Host header logged in the web server 6.1SPx logs, then you can try below:
add last one below in magnus.conf, i.e. %Req->headers.host%
Init fn="flex-init" access="$accesslog" format.access="%Ses->client.ip% - %Req->vars.auth-user% [%SYSDATE%] \"%Req->reqpb.clf-request%\" %Req->srvhdrs.clf-status% %Req->srvhdrs.content-length% %vsid% %Req->headers.host% "
then it will log the host header of the incoming request, e.g.
apple:/export/home/iws6.1sp10> telnet localhost 60103
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /banner.html HTTP/1.1
Host: dummytest (note this)
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Wed, 05 Nov 2008 10:45:37 GMT
Content-length: 1827
Content-type: text/html
Last-modified: Mon, 29 Sep 2008 08:37:07 GMT
Etag: "723-48e093b3"
Accept-ranges: bytes
...........
The log will show,
127.0.0.1 - - [05/Nov/2008:18:45:37 +0800] "GET /banner.html HTTP/1.1" 200 1827 https-sess dummytest
You can see the Host: dummytest in the last column above.
See more at
http://docs.sun.com/app/docs/doc/820-1639/6nda10e4a?l=ja&a=view
e.g. add Req->headers.cookie.cookie_name for










