Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Web server
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Serve dynamic content ==== [[File:Web server serving static and dynamic content.png|thumb|221x144px|right|PC clients communicating via network with a web server serving static and dynamic content]] If a web server program is capable of '''serving dynamic content''' and it has been configured to do so, then it is able to communicate with the proper internal module or external program (associated with the requested URL path) in order to pass to it the parameters of the client request. After that, the web server program reads from it its data response (that it has generated, often on the fly) and then it resends it to the client program who made the request.{{citation needed|date=November 2021}} NOTE: when serving '''static and dynamic content''', a web server program usually has to support also the following HTTP method in order to be able to safely '''receive data''' from client(s) and so to be able to host also websites with interactive form(s) that may send large data sets (e.g. lots of [[data entry]] or [[file upload]]s) to web server / external programs / modules: * <code>POST</code> In order to be able to communicate with its internal modules and/or external programs, a web server program must have implemented one or more of the many available '''gateway interface(s)''' (see also [[#StandardCGIs|Web Server Gateway Interfaces used for dynamic content]]). The three '''standard''' and historical '''gateway interfaces''' are the following ones. ; [[Common Gateway Interface|CGI]] : An external CGI program is run by web server program for each dynamic request, then web server program reads from it the generated data response and then resends it to client. ; [[Simple Common Gateway Interface|SCGI]] : An external SCGI program (it usually is a process) is started once by web server program or by some other program / process and then it waits for network connections; every time there is a new request for it, web server program makes a new network connection to it in order to send request parameters and to read its data response, then network connection is closed. ; [[FastCGI]] : An external FastCGI program (it usually is a process) is started once by web server program or by some other program / process and then it waits for a network connection which is established permanently by web server; through that connection are sent the request parameters and read data responses. ===== Directory listings ===== [[File:Web server directory list.png|thumb|271x161px|right|Directory listing dynamically generated by a web server]] {{Main|Web server directory index}} A web server program may be capable to manage the dynamic generation (on the fly) of a '''[[Web server directory index|directory index list]]''' of files and sub-directories.<ref name="ws-directory-listings">{{Cite web|url=https://cwiki.apache.org/confluence/display/HTTPD/DirectoryListings|title=Directory listings|author=ASF Infrabot|publisher=Apache foundation: HTTPd server project|date=2019-05-22|access-date=2021-11-16|language=en|archive-date=7 June 2019|archive-url=https://web.archive.org/web/20190607234544/https://cwiki.apache.org/confluence/display/HTTPD/DirectoryListings|url-status=live}}</ref> If a web server program is configured to do so and a requested URL path matches an existing directory and its access is allowed and no static index file is found under that directory then a web page (usually in HTML format), containing the list of files and/or subdirectories of above mentioned directory, is ''dynamically generated'' (on the fly). If it cannot be generated an error is returned. Some web server programs allow the customization of directory listings by allowing the usage of a web page template (an HTML document containing placeholders, e.g. <code>$(FILE_NAME), $(FILE_SIZE)</code>, etc., that are replaced with the field values of each file entry found in directory by web server), e.g. <code>index.tpl</code> or the usage of HTML and embedded source code that is interpreted and executed on the fly, e.g. <code>index.asp</code>, and / or by supporting the usage of dynamic index programs such as CGIs, SCGIs, FCGIs, e.g. <code>index.cgi</code>, <code>index.php</code>, <code>index.fcgi</code>. Usage of dynamically generated ''directory listings'' is usually avoided or limited to a few selected directories of a website because that generation takes much more OS resources than sending a static index page. The main usage of ''directory listings'' is to allow the download of files (usually when their names, sizes, modification date-times or [[file attribute]]s may change randomly / frequently) ''as they are, without requiring to provide further information to requesting user''.<ref name="ws-apache-dir">{{Cite web|url=https://archive.apache.org/dist/httpd/|title=Apache: directory listing to download files|author=|publisher=Apache: HTTPd server|access-date=2021-12-16|archive-date=2 December 2021|archive-url=https://web.archive.org/web/20211202004258/http://archive.apache.org/dist/httpd/|url-status=live}}</ref> ===== Program or module processing ===== An external program or an internal module (''processing unit'') can execute some sort of application function that may be used to get data from or to store data to one or more [[Content repository|data repositories]], e.g.:{{citation needed|date=November 2021}} * files (file system); * [[database]]s (DBs); * other sources located in local computer or in other computers. A ''processing unit'' can return any kind of web content, also by using data retrieved from a data repository, e.g.:{{citation needed|date=November 2021}} * a document (e.g. [[HTML]], [[XML]], etc.); * an image; * a video; * structured data, e.g. that may be used to update one or more values displayed by a dynamic page ([[DHTML]]) of a [[web interface]] and that maybe was requested by an [[XMLHttpRequest]] [[API]] (see also: [[Dynamic web page|dynamic page]]). In practice whenever there is content that may vary, depending on one or more parameters contained in client request or in configuration settings, then, usually, it is generated dynamically.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)