Skip to main content

Web Server Protocals


    Web Server Software, we mentioned that "To consider a software to be web server, the software must implement the HTTP protocol". So, to understand how web server works, we need to understand the HTTP (Hypertext Transfer Protocol) and by understanding HTTP, you will have a better sense of troubleshooting any issues appear between Web Servers (Apache HTTP as an example) and Web Clients (Web Browsers). So

1.  What is HTTP?

The HTTP (Hypertext Transfer Protocol) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP is used to deliver data between web servers and web clients, HTTP is a TCP/IP protocol which means that it's a reliable protocol. It guarantees that your data will not be damaged in transit. The default HTTP port is TCP "80", but other ports can be used as well.

2.  How HTTP Works?
Once you enter a web address (https://middlewaretechnologiesbyashok.blogspot.in) in your web browser (Firefox, Chrome, etc), the HTTP fetches information from the web server (Apache HTTP) and responses back that requested web page to the client (Firefox). Once upon a time, "https://" needed to      be before any web address to tell the browser that you use http protocol but those days you don't need to write "https://" because the web clients become smarter enough to understand that you mean http


            image 2.5.1
When you type a web page address as " https://middlewaretechnologiesbyashok.blogspot.in " , the web browser sends an HTTP request to the web server that stores middlewaretechnologiesbyashok.blogspot.in files , the web server tries to find the desired object ("index.html") and if the web server finds the object , web server sends the object to the client in an HTTP response, along with the type of the object (in this case , HTML format) , the length of the object and other information which we will talk about soon.
3.  Web Resources
Web resource is the source of web content, web resource could be static files such as html, pdf, jpeg and mp4, dynamic content which generates on the fly such as stock prices, weather and news. Dynamic contents are usually data that updated frequently or data retrieved from databases upon your request
4.  Uniform Resource Identifier (URI)

I believe that you know the purpose of postal addresses, right?  You can go to your destination by knowing the postal address of the destination. The same concept happened on the Internet, to browse any web site (your destination), you need to know its address (postal address) and we call this address URI (Uniform Resource Identifier).

Here's a URI for an image resource on middlewaretechnologiesbyashok.blogspot.in web server https://middlewaretechnologiesbyashok.blogspot.in


5.  Uniform Resource Locator (URL)

Uniform Resource Locator (URL), commonly informally termed a web address. URL describe the specific location of a web resource on a server. A URL has two main components
-   Protocol identifier: For the URL https://middlewaretechnologiesbyashok.blogspot.in/, the protocol identifier is http.


-   Resource name: For the URL https://middlewaretechnologiesbyashok.blogspot.in/, the resource name is "logo.png"

6.  Media Types (MIME)
Web Servers attach a MIME type to all HTTP object data. When a web browser gets an object back from a server, it looks at the associated MIME type to see if it knows how to handle the object. Most browsers can handle hundreds of popular object types: displaying image files, parsing and formatting HTML files, playing audio files through the computer's speakers, or launching external plug-in software to handle special formats.

7.  HTTP Request Methods

HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. The method tells the server what action to perform, this action could retrieve a web page or delete a file

Method
Description
GET
Used to retrieve information from the given server using a given URL. GET retrieve data only and don't have other effect on the data.
HEAD
Same as GET, but transfers the status line and header
section only without the response body


POST
Used to submit data to be processed to a specified resource
PUT
Replaces all current representations of the target resource
with the uploaded content
DELETE
Removes all current representations of the target resource given by a URL
CONNECT
Establishes a tunnel to the server identified by a given URL
OPTIONS
Describes the communication options for the target resource
Table 5.2.1


8.  HTTP Status Codes
Every HTTP response message comes back with a status code. The status code is a three-digit numeric code that tells the client if the request succeeded or if other actions are required. Understanding the HTTP Status Codes help you to troubleshoot the web server. Common status codes shown in Table 5.2.2

Status Code
Description
200
Success, Document Returned correctly
301
The requested page has moved to a new url
404
The server cannot find the requested page
500
The requested was not completed, the server me an unexpected condition


Table 5.2.2


For full HTTP status codes, please visit "https://httpstatuses.com/"
Httpstatus.com is an easy to reference database of HTTP Status Codes with their definitions and helpful code references all in one place.


9.  HTTP Protocol Versions

There are several versions of the HTTP protocol, currently HTTP/1.1 is                                          the most widely used http protocol, the new HTTP/2 was published in February 2015 and someday it will replace the HTTP/1.1, here's a list of HTTP Protocol Versions


-     HTTP/0.9
HTTP/0.9 supports only GET method, and it doesn't support MIME types, HTTP headers or version numbers

-   HTTP/1.0
HTTP/1.0 added version numbers, HTTP headers, additional methods and multimedia object handling. HTTP/1.0 made it practical to support graphically appealing web pages and interactive forms.

-   HTTP/1.1
HTTP/1.1 focused on correcting architectural flaws in the design of HTTP, specifying semantics, introducing significant performance optimizations and removing mis-features

-HTTP/2.0
HTTP/2 is a replacement for how HTTP is expressed “on the wire.” It is not a ground-up rewrite of the protocol; HTTP methods, status codes and semantics are the same, and it should be possible to use the same APIs as HTTP/1.x (possibly with some small additions) to represent the protocol. The focus of the protocol is on performance; specifically, end-user perceived latency, network and server resource usage. One major goal is to allow the use of a single connection from browsers to a Web site.




Comments

Post a Comment

Popular posts from this blog

oracle.ohs.plugin.nodemanager.OhsProcessManagementPlugin$ProcessImpl buildIoException SEVERE: Failed to start the server ohs1 In New Installation of FMW 12.2.1.3 on Windows Server

Problem Summery: When we are trying start OHS instance it's failing with an error. Error: 29 Mar, 2018 10:30:22 PM IST> <INFO> <Server Implementation Class: weblogic.nodemanager.server.NMServer$ClassicServer.> <29 Mar, 2018 10:30:23 PM IST> <INFO> <Secure socket listener started on port 5556> <29 Mar, 2018 10:30:54 PM IST> <INFO> <base_domain> <ohs1> <Creating directory "F:\OHS\user_projects\domains\base_domain\system_components\OHS\ohs1\data\nodemanager"> Mar 29, 2018 10:30:54 PM oracle.ohs.plugin.nodemanager.OhsProcessManagementPlugin$ProcessImpl start INFO: Starting server ohs1 Mar 29, 2018 10:30:55 PM oracle.ohs.plugin.nodemanager.OhsRunCommand execute INFO: Running F:\OHS\ohs\bin\launch.exe F:\OHS\ohs\bin\httpd.exe -DOHS_MPM_WINNT -d F:/OHS/user_projects/domains/base_domain/config/fmwconfig/components/OHS/instances/ohs1 -f F:\OHS\user_projects\doma ins\base_domain\config\fmwconfig\c...

Node Manager Username and Password for Oracle HTTP Server 12c in a Standalone Domain

Start the Ohs Instance for 12C F:\OHS\user_projects\domains\base_domain\bin>stopComponent.cmd ohs1 Step:1 Stop the OHS component F:\OHS\user_projects\domains\base_domain\bin>stopComponent.cmd ohs1 Stopping System Component ohs1 ... Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Reading domain from F:/OHS/user_projects/domains/base_domain Please enter Node Manager password: Connecting to Node Manager ... Successfully Connected to Node Manager. Killing server ohs1 ... Successfully killed server ohs1 Successfully disconnected from Node Manager. Exiting WebLogic Scripting Tool. Done Step:2   Invoke WLST offline F:\OHS\oracle_common\common\bin>wlst.cmd Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline> Step:3 Conne...

Avoid password prompt when using startComponent.sh to start OHS 12c

Step:1 Start Ohs With Password Prompt F:\OHS\user_projects\domains\base_domain\bin>startComponent.cmd ohs1 Starting system Component ohs1 ... Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Reading domain from F:/OHS/user_projects/domains/base_domain Please enter Node Manager password: Connecting to Node Manager ... Successfully Connected to Node Manager. Starting server ohs1 ... Successfully started server ohs1 ... Successfully disconnected from Node Manager. Exiting WebLogic Scripting Tool. Done Step:2 Store the password for avoid ohs password F:\OHS\user_projects\domains\base_domain\bin>startComponent.cmd ohs1 storeUserConfig Starting system Component ohs1 ... Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Reading domain from F:/OHS/u...