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 static content ==== [[File:Web server serving static content.png|thumb|221x144px|right|PC clients communicating via network with a web server serving static content only]] If a web server program is capable of '''serving static content''' and it has been configured to do so, then it is able to send file content whenever a request message has a valid URL path matching (after URL mapping, URL translation and URL redirection) that of an existing file under the root directory of a website and file has attributes which match those required by internal rules of web server program.<ref name="ws-static-rqs-root-dir" /> That kind of content is called ''static'' because usually it is not changed by the web server when it is sent to clients and because it remains the same until it is modified (file modification) by some program. NOTE: when serving '''static content only''', a web server program usually '''does not change file contents''' of served websites (as they are only read and never written) and so it suffices to support only these [[HTTP method]]s: * <code>OPTIONS</code> * <code>HEAD</code> * <code>GET</code> Response of static file content can be sped up by a '''[[#File cache|file cache]]'''. ===== Directory index files ===== {{Main|Web server directory index}} If a web server program receives a client request message with an URL whose path matches one of an existing ''directory'' and that directory is accessible and serving directory index file(s) is enabled then a web server program may try to serve the first of known (or configured) static index file names (a [[#Regular files|regular file]]) found in that directory; if no index file is found or other conditions are not met then an error message is returned. Most used names for static index files are: <code>index.html</code>, <code>index.htm</code> and <code>Default.htm</code>. ===== Regular files ===== If a web server program receives a client request message with an URL whose path matches the file name of an existing ''file'' and that file is accessible by web server program and its attributes match internal rules of web server program, then web server program can send that file to client. Usually, for security reasons, most web server programs are pre-configured to serve only [[regular file]]s or to avoid to use ''special file types'' like [[device file]]s, along with [[symbolic link]]s or [[hard link]]s to them. The aim is to avoid undesirable side effects when serving static web resources.<ref name="web-server-http">{{Cite book|url=https://books.google.com/books?id=oxg8_i9dVakC&pg=PA38|title=HTTP developer's handbook|author=Chris Shiflett|year=2003|access-date=2021-12-09|language=en|publisher=Sams's publishing|isbn=0-672-32454-7|archive-date=20 January 2023|archive-url=https://web.archive.org/web/20230120185219/https://www.google.it/books/edition/HTTP_Developer_s_Handbook/oxg8_i9dVakC?hl=en&gbpv=1&pg=PA38&printsec=frontcover|url-status=live}}</ref>
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)