Hi!
I have a problem with Apache 1.1.1 reporting wrong number of
server port used in SERVER_PORT variable. I am trying to set the
server to listen to all ports from 80 to 85, and I did this by
putting these lines in srm.conf
Port 80
Listen 80
Listen 81
Listen 82
Listen 83
Listen 84
Listen 85
Note that without 'Listen 80' it did not want to listen to
port 80, but that is not the problem, at least not any more. The
problem is that Apache always reports port 80, even when other ports
are used. For example, if i lookup http://www.bktv.com/cgi-bin/test-cgi,
it reports:
CGI/1.0 test script report:
argc is 0. argv is .
SERVER_SOFTWARE = Apache/1.1.1
SERVER_NAME = www.bktv.com
GATEWAY_INTERFACE = CGI/1.1
SERVER_PROTOCOL = HTTP/1.0
SERVER_PORT = 80
REQUEST_METHOD = GET
HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
PATH_INFO =
PATH_TRANSLATED =
SCRIPT_NAME = /cgi-bin/test-cgi
QUERY_STRING =
REMOTE_HOST = gazda.bktv.com
REMOTE_ADDR = 194.247.204.163
REMOTE_USER =
AUTH_TYPE =
CONTENT_TYPE =
CONTENT_LENGTH =
... which is correct. On the other hand, if I tell the browser to use
another port, for example http://www.bktv.com:81/cgi-bin/test-cgi,
I get exactly the same thing (the port number did not change):
CGI/1.0 test script report:
argc is 0. argv is .
SERVER_SOFTWARE = Apache/1.1.1
SERVER_NAME = www.bktv.com
GATEWAY_INTERFACE = CGI/1.1
SERVER_PROTOCOL = HTTP/1.0
SERVER_PORT = 80
REQUEST_METHOD = GET
HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
PATH_INFO =
PATH_TRANSLATED =
SCRIPT_NAME = /cgi-bin/test-cgi
QUERY_STRING =
REMOTE_HOST = gazda.bktv.com
REMOTE_ADDR = 194.247.204.163
REMOTE_USER =
AUTH_TYPE =
CONTENT_TYPE =
CONTENT_LENGTH =
I need this because I have to write HTML file parser which acts
differently, based on the port used. Does anybody know why does Apache
always report the base port!?
Aleksandar Susnjar,
P.S. You may try this yourself, we're on The Net, except for the
nights (local time, CET), for now.