You are here:Home»KB»Web Server»Apache Server Environmental Variables
Saturday, 14 May 2011 19:47

Apache Server Environmental Variables

Written by

A list of Apache Server Environmental Variables from zytrax
All the variables are described for easy reading.


This is a current list of Apache 2.2 Server Environmental Variables

HTTP headers: connection & request:  
HTTP_USER_AGENT
HTTP_REFERER
HTTP_COOKIE
HTTP_FORWARDED
HTTP_HOST
HTTP_PROXY_CONNECTION
HTTP_ACCEPT
REMOTE_ADDR
REMOTE_HOST
REMOTE_PORT
REMOTE_USER
REMOTE_IDENT
REQUEST_METHOD
SCRIPT_FILENAME
PATH_INFO
QUERY_STRING
AUTH_TYPE
 
server internals: date and time: specials:
DOCUMENT_ROOT
SERVER_ADMIN
SERVER_NAME
SERVER_ADDR
SERVER_PORT
SERVER_PROTOCOL
SERVER_SOFTWARE
TIME_YEAR
TIME_MON
TIME_DAY
TIME_HOUR
TIME_MIN
TIME_SEC
TIME_WDAY
TIME
API_VERSION
THE_REQUEST
REQUEST_URI
REQUEST_FILENAME
IS_SUBREQ
HTTPS


This is an old list of Apache Server Environmental Variables

HEADERS
 
WHAT VARIBLES IT WILL SHOW
 
GET, HEAD, PUT POST are the base request commands of the HTTP protocol. This first line would suffice to request the wanted information.
REQUEST_METHOD : GET
SERVER_PROTOCOL: will show which version of HTTP you are using, usually HTTP1.0 or HTTP1.1
HTTP_XROXY_CONNECTION : usually Keep-Alive
HTTP_ACCEPT_CHARSET: iso-8859-1,*,utf-8
HTTP_REFERER_FROM: shows the page you came from, where you came from before or the last page you visited before the current one, or if you came from a link. Typed URLs and bookmarks usually result in this variable being left blank. http:\/\/(www\.)?$mydomain\//);
HTTP_USER_AGENT : shows which browser type you are using, your browser version and also the O/S you use
HTTP_HOST: the remote server's name you are accesing
SERVER_PORT: shows the web server's listening port. usually 80, 8080, 3128 (if you are on HTTP)
SERVER_SOFTWARE: the remote server's O/S (Apache/1.2.4 for example)
SCRIPT_NAME: what kind of scripts the remote server is running if any (/cgi-bin/show-http-headers)
REMOTE_ADDRESS : or REMOTE_HOST : will show your IP number, or if you are usign a proxy, it's IP number
HTTP_REMOTE_HOST : will show your host name and address -country, ets
IDENT-Lookup: Username: will show yor PC's name, your operating system: your charset:
REMOTE_PORT: shows the port the remote server uses
SERVER_NAME: the DNS name of the server you are accessing
SERVER_ADMIN: usually the email address of the webmaster
HTTP_COOKIE: If your browser finds a cookie in his cookie file matching the domain of this server it will send it along with every request. This server also tries to set up a cookie in your browser. If this is successfully done, you can see this cookie in your request when RELOADing this page.
HTTP_X_FORWARDED_FROM: or HTTP_FORWARDED: if you use a proxy, it will show here
shows where you've been routed from. proxy can forward real ip here, In order to remain anonymous the you DO NOT want your real IP showing, only the proxy's.(trully anon proxies will NOT show HTTP_FORWARDED or HTTP_X_FORWARDED_FOR variables,
HTTP_FORWARDED : shows the path you use in connecting to a web server this line shows exactly where you're coming from. reveals proxy used VIA : reveals use of proxy
HTTP_VIA : if you are usign a proxy, the name will show up here
HTTP_ACCEPT: will show what kind of images your browser will accept such as: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* These are the MIME-types accepted by your browser, sometimes with a quality factorappended.
CLIENT_IP : your IP can be revealed by proxy
HTTP_FROM : sometimes IP proxied from is revealed here, so make sure you look at that option when evaluating how secure a proxy is!
ACCEPT-LANGUAGE: or HTTP_ACCEPT_LANGUAGE: Here your browser may indicate which languages it prefers. ISO-country-codes are used to accomplish this. So "en" is english, "de" is german, "ru" is russian, etc
SCRIPT_NAME: if the server wil run any scripts like cgi, ets.
Read 1048 times