{"id":32,"date":"2009-07-03T08:08:14","date_gmt":"2009-07-03T08:08:14","guid":{"rendered":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/variabili-d-ambiente-apache-ed-estensioni-ssi\/"},"modified":"2009-07-03T08:08:14","modified_gmt":"2009-07-03T08:08:14","slug":"variabili-d-ambiente-apache-ed-estensioni-ssi","status":"publish","type":"post","link":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/2009\/07\/03\/variabili-d-ambiente-apache-ed-estensioni-ssi\/","title":{"rendered":"Variabili d&#8217;ambiente Apache ed estensioni SSI"},"content":{"rendered":"<h1><span style=\"color: #003366\">Variabili d&#8217;ambiente di Apache<\/span><\/h1>\n<p>Ecco un elenco delle variabili d&#8217;ambiente Apache (Environmental Variables) e delle relative estensioni SSI (Server Side Includes).<\/p>\n<p>Le variabili sono visualizzabili col comando <strong><em>echo <\/em><\/strong>di Apache o <em><strong>#printev<\/strong><\/em> di PHP.<\/p>\n<p>Attenzione, i nomi delle varibili sono case sensitive.<\/p>\n<h3>GATEWAY_INTERFACE<\/h3>\n<p>Versione e revisione delle specifiche CGI che il server supporta.<\/p>\n<pre><span style=\"color: #339966\"><em><strong>Esempio: <\/strong><\/em><\/span><\/pre>\n<pre><span style=\"color: #339966\"><em><strong>GATEWAY_INTERFACE=CGI\/1.1 <\/strong><\/em><\/span><\/pre>\n<h3>PATH<\/h3>\n<p>I percorsi disponibili sul server per il sito web di riferimento<\/p>\n<pre><strong><span style=\"color: #339966\"><em>Esempio: <\/em><\/span><\/strong><\/pre>\n<pre><em><strong><span style=\"color: #339966\">PATH=\/sbin:\/usr\/sbin:\/bin:\/usr\/bin:\/usr\/X11R6\/bin <\/span><\/strong><\/em><\/pre>\n<h3><a title=\"qs\" name=\"qs\"><\/a>QUERY_STRING<\/h3>\n<p>Le eventuali informazioni inviate in querystring.<\/p>\n<pre><em><strong><span style=\"color: #339966\">Esempio: <\/span><\/strong><\/em><\/pre>\n<pre><em><strong><span style=\"color: #339966\">chiamando h**ttp:\/\/ilmiosito.it?parola=ciao&amp;valore=10 si ha<\/span><\/strong><\/em><\/pre>\n<pre><em><strong><span style=\"color: #339966\">QUERY_STRING=parola=ciao&amp;valore=10 si ha<\/span><\/strong><\/em><\/pre>\n<h3>REMOTE_ADDR<\/h3>\n<p>Restituisce l&#8217;indirizzo IP dell&#8217;host che sta realizzando la richiesta.<\/p>\n<pre><strong><em><span style=\"color: #339966\">Esempio: <\/span><\/em><\/strong><\/pre>\n<pre><strong><em><span style=\"color: #339966\">REMOTE_ADDR=207.35.76.27 <\/span><\/em><\/strong><\/pre>\n<h3>REMOTE_PORT<\/h3>\n<p>Il numero di porta usato dall&#8217;host remoto che realizza la richiesta<\/p>\n<p><em><strong><span style=\"color: #339966\">Esempio:<br \/>\n<\/span><\/strong><\/em><\/p>\n<pre><em><strong><span style=\"color: #339966\">REMOTE_PORT=4325 <\/span><\/strong><\/em><\/pre>\n<h3>REQUEST_METHOD<\/h3>\n<p>Il metodo usato dall&#8217;host remoto che realizza la richiesta (GET, HEAD, POST)<\/p>\n<p><strong><em><span style=\"color: #339966\">Esempio:<\/span><\/em><\/strong><\/p>\n<pre><strong><em><span style=\"color: #339966\">REQUEST_METHOD=POST <\/span><\/em><\/strong><\/pre>\n<h3>REQUEST_URI<\/h3>\n<p>La URI della richiesta (relativamente alla DOCUMENT_ROOT)<\/p>\n<pre><strong><em><span style=\"color: #339966\">Esempio: <\/span><\/em><\/strong><\/pre>\n<pre><strong><em><span style=\"color: #339966\">REQUEST_URI=\/vs\/web\/variabili.htm <\/span><\/em><\/strong><\/pre>\n<h3>SCRIPT_FILENAME<\/h3>\n<p>Il percorso dello script in esecuzione(relativamente alla DOCUMENT_ROOT)<\/p>\n<p><strong><em><span style=\"color: #339966\">Esempio:<br \/>\n<\/span><\/em><\/strong><\/p>\n<pre><strong><em><span style=\"color: #339966\">SCRIPT_FILENAME=\/tech\/web\/ssi.htm <\/span><\/em><\/strong><\/pre>\n<h3>SCRIPT_NAME<\/h3>\n<p>Il nome dello script in esecuzione(relativamente alla DOCUMENT_ROOT)<\/p>\n<p><span style=\"color: #339966\"><strong><em>Esempio: <\/em><\/strong><\/span><\/p>\n<pre><span style=\"color: #339966\"><strong><em>SCRIPT_NAME=\/tech\/web\/ssi.htm <\/em><\/strong><\/span><\/pre>\n<h3>SERVER_ADDR<\/h3>\n<p>L&#8217;indirizzo IP del server dell&#8217;URL chiamato<\/p>\n<pre><span style=\"color: #339966\"><em><strong>Esempio: <\/strong><\/em><\/span><\/pre>\n<p><span style=\"color: #339966\"><em><strong>SERVER_ADDR=207.35.76.24 <\/strong><\/em><\/span><\/p>\n<h3>SERVER_ADMIN<\/h3>\n<p>L&#8217;indirizzo email dell&#8217;amministratore del server<\/p>\n<pre><em><strong><span style=\"color: #339966\">Esempio: \u00a0<\/span><\/strong><\/em><\/pre>\n<pre><em><strong><span style=\"color: #339966\">SERVER_ADMIN=webmaster@zytrax.com <\/span><\/strong><\/em><\/pre>\n<h3>SERVER_NAME<\/h3>\n<p>The servers host name, DNS alias or IP address. For Apache the name appearing on the relevant ServerName directive (may be in the general section or a &lt;virtualhost&gt; section e.g.<\/p>\n<pre>SERVER_NAME=www.zytrax.com<\/pre>\n<h3>SERVER_PORT<\/h3>\n<p>The port number on this server to which this request was directed e.g.<\/p>\n<pre>SERVER_PORT=80<\/pre>\n<h3>SERVER_PROTOCOL<\/h3>\n<p>The name and revision of the protocol that delivered the current request e.g.<\/p>\n<pre>SERVER_PROTOCOL=HTTP\/1.1<\/pre>\n<h3>SERVER_SIGNATURE<\/h3>\n<p>The HTML string that may be embedded in the page to identify this host e.g.<\/p>\n<pre>SERVER_SIGNATURE=&lt;ADDRESS&gt;Apache\/1.3.14 Server at www.zytrax.com Port 80&lt;\/ADDRESS&gt;<\/pre>\n<h3>SERVER_SOFTWARE<\/h3>\n<p>The name and version of the information server answering the query e.g.<\/p>\n<pre>SERVER_SOFTWARE=Apache\/1.3.14 (Unix) (Red-Hat\/Linux) PHP\/4.0.3pl1<\/pre>\n<h1>HTTP Header Variables<\/h1>\n<p>The following variables are constructed from the HTTP header information supplied by the requestor.<\/p>\n<h3>HTTP_ACCEPT<\/h3>\n<p>The MIME types the requestor will accept as defined in the HTTP header e.g.<\/p>\n<pre>HTTP_ACCEPT=*\/*<\/pre>\n<h3>HTTP_ACCEPT_ENCODING<\/h3>\n<p>The MIME types the requestor will accept as defined in the HTTP header e.g.<\/p>\n<pre>HTTP_ACCEPT_ENCODING=gzip, deflate<\/pre>\n<h3>HTTP_ACCEPT_LANGUAGE<\/h3>\n<p>The LANGUAGE types the server is requested to accept as defined in the HTTP header and typically used for content negotiation e.g.<\/p>\n<pre>HTTP_ACCEPT_LANGUAGE=en-us<\/pre>\n<h3>HTTP_CONNECTION<\/h3>\n<p>The type of connection as defined in the HTTP header e.g.<\/p>\n<pre>HTTP_CONNECTION=Keep-Alive<\/pre>\n<h3>HTTP_COOKIE<\/h3>\n<p>The value of any cookie in the HTTP header. Standard cookie formats are defined by RFC 2965 (Set-Cookie2 header) and the older (non-standard) <a class=\"t-db\" href=\"http:\/\/wp.netscape.com\/newsref\/std\/cookie_spec.html\">netscape cookie format<\/a>.<\/p>\n<h3>HTTP_HOST<\/h3>\n<p>The base URL of the host e.g.<\/p>\n<pre>HTTP_HOST=www.zytrax.com<\/pre>\n<h3>HTTP_REFERER<\/h3>\n<p>The URL of the page that made this request. If linked from e-mail or manually entered this value is NULL.<\/p>\n<pre>HTTP_REFERER=http:\/\/www.zytrax.com\/tech\/web\/<\/pre>\n<h3>HTTP_USER_AGENT<\/h3>\n<p>The browser id or user-agent string identifying the browser (nominally defined by RFC 1945 and RFC 2068). See <a class=\"t-db\" href=\"http:\/\/www.zytrax.com\/tech\/web\/browser_ids.htm\">here<\/a> for our current list.<\/p>\n<pre>HTTP_USER_AGENT=Mozilla\/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)<\/pre>\n<h1>SSI Extensions<\/h1>\n<p>This section defines the additional variables made available by SSI.<\/p>\n<h3>DATE_GMT<\/h3>\n<p>The current date and time in Greenwich Mean Time (now Unviversal Co-ordinated Time (UCT) in the default or #config defined format).<\/p>\n<pre>DATE_GMT=Thursday, 03-May-2001 21:18:54 GMT<\/pre>\n<h3>DATE_LOCAL<\/h3>\n<p>The current date and time in the local (server) timezone (in the default or #config defined format).<\/p>\n<pre>DATE_LOCAL=Thursday, 03-May-2001 17:18:54 EDT<\/pre>\n<h3>DOCUMENT_ROOT<\/h3>\n<p>The root directory of this site defined by the &#8216;DocumentRoot&#8217; directive in the General Section or a &lt;virtualhost&gt; section e.g.<\/p>\n<pre>DOCUMENT_ROOT=\/var\/www\/zytrax<\/pre>\n<h3>DOCUMENT_NAME<\/h3>\n<p>The file name (excludes directories) of the document requested by the user e.g.<\/p>\n<pre>DOCUMENT_NAME=ssi.htm<\/pre>\n<h3>DOCUMENT_PATH_INFO<\/h3>\n<p>Not well documented but it seems that if there is query string information following the URL (starts with a &#8216;?&#8217;), for instance, ..\/index.html?x=a, the data (x=a) is placed in QUERY_STRING. If the additional data starts with a \/, for instance, ..\/index.html\/path?x=a the data (path?x=a) is placed in the DOCUMENT_INFO_PATH variable. Apache 2.x allows the behaviour to be controlled using the AcceptPathInfo directive<\/p>\n<pre>DOCUMENT_PATH_INFO=<\/pre>\n<h3>DOCUMENT_URI<\/h3>\n<p>The URL path of the document requested by the user e.g.<\/p>\n<pre>DOCUMENT_URI=\/tech\/web\/ssi.htm<\/pre>\n<h3>LAST_MODIFIED<\/h3>\n<p>The last modification date of the document (file) requested by the user (in the default or #config defined format). This variable is not changed for <a class=\"t-db\" href=\"http:\/\/www.zytrax.com\/tech\/web\/ssi.htm\"> SSI included files<\/a>.<\/p>\n<pre>LAST_MODIFIED=Thursday, 03-May-2001 17:18:45 EDT<\/pre>\n<h3>USER_NAME<\/h3>\n<p>The user name of the web site in which this web site runs e.g.<\/p>\n<pre>USER_NAME=zytrax<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Variabili d&#8217;ambiente di Apache Ecco un elenco delle variabili d&#8217;ambiente Apache (Environmental Variables) e delle relative estensioni SSI (Server Side Includes). Le variabili sono visualizzabili col comando echo di Apache o #printev di PHP. Attenzione, i nomi delle varibili sono case sensitive. GATEWAY_INTERFACE Versione e revisione delle specifiche CGI che il server supporta. Esempio: GATEWAY_INTERFACE=CGI\/1.1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[16],"tags":[27,28,64,161,167,182,183],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-web-server","tag-apache","tag-apache-web-server","tag-environmental-variables","tag-server-side-include","tag-ssi","tag-variabili","tag-variabili-dambiente"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/posts\/32"}],"collection":[{"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":1,"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":179,"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/posts\/32\/revisions\/179"}],"wp:attachment":[{"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.vincenzoscognamiglio.it\/informatica\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}