DEV Community

Ezhil Arasan
Ezhil Arasan

Posted on

Server/404

what is server?
A server is a hardware device or software that processes requests sent over a network and replies to them. A client is the device that submits a request and waits for a response from the server. The computer system that accepts requests for online files and transmits those files to the client is referred to as a server in the context of the Internet.

Server
A Server is a program or a device that provides functionality for called clients which are other programs or devices. This architecture is called the client-server model.

A single overall computation is distributed across multiple processes or devices. Servers can provide various functionalities called services. These services include sharing data or resources among multiple clients or performing computations for a client. Multiple clients can be served by a single server, and a single client can use multiple servers.

Key Characteristics of a Server

Provides Services: Servers perform specific tasks like hosting websites, managing emails, storing files, or running applications. These services can vary depending on the server’s purpose. Each type of server performs a specific, well-defined task and is optimized for that role.
File Server: Stores and lets users share files over a network.
Mail Server: Sends, receives, and stores emails (e.g., Microsoft Exchange, Postfix).
Database Server: Provides database access and handles queries (e.g., MySQL, Oracle).
Game Server: Hosts online multiplayer games and syncs game data between players.
Web Server: Serves web pages to browsers (e.g., Apache, Nginx)

Components of Server
Specific components will differ based on the form factor and function of a given server, but common components are covered here.

Hardware: The dedicated server's central processing unit (CPU) , memory , storage device , network interfaces, and the server chassis are all included in this.

Network Connectivity: Over a local area network (LAN) , wide area network (WAN) , or the internet , server programs connect to the network architecture and communicate with client devices. To offer redundancy and accommodate various network setups, certain server form factors contain several network interfaces.

Server OS: This operating system (OS) was created with a particular kind of client/server environment in mind.

Management and Monitoring Tools: Instruments for remote management and performance monitoring are frequently included with servers.

Server Software: This server software supports a particular use case. Software for email servers, web servers, and database servers are a few examples.

High-Availability Features: High-availability (HA) capabilities are included on some servers to reduce downtime and guarantee continuous operation. This involves having access to numerous storage systems, backup power supply and network interfaces, and configuration management tools that enable automatic failover and load balancing .

Types of Servers and Their Applications

Application Server
These servers host web apps (computer programs that run inside a web browser) allowing users in the network to run and use them preventing the installation of a copy on their own computers. These servers need not be part of the World Wide Web. Their clients are computers with a web browser.

Catalog Server
These servers maintain an index or table of contents of information that can be found across a large distributed network. Distributed networks may include computers, users, files shared on file servers, and web apps. Examples of catalog servers are directory servers and name servers.
Their clients are any computer program that needs to find something on the network. An example can be a domain member attempting to log in, an email client looking for an email address, or a user looking for a file

Communication Server
These servers maintain an environment needed for one communication endpoint to find other endpoints and then communicate with them.
These servers may or may not include a directory of communication endpoints and a presence detection service, depending on the openness and security parameters of the network. Their clients are communication endpoints.

Computing Server
These servers share vast amounts of computing resources which include CPU and random-access memory over a network. Any computer program that needs more CPU power and RAM than a personal computer can probably afford can use these types of servers.
The client must be a networked computer to implement the client–server model which is a necessity.

Database Server
These servers maintain and share any form of database over a network. A database is an organized collection of data with predefined properties that may be displayed in a table.
Clients of these servers are spreadsheets, accounting software, asset management software, or virtually any computer program that consumes well-organized data, especially in large volumes.

Fax Server
These servers share one or more fax machines over a network which eliminates the hassle of physical access. Any fax sender or recipient is the client of these servers.

File Server
Shares files and folders, storage space to hold files and folders, or both, over a network. Networked computers are the intended clients, even though local programs can be clients.

Game Server
These servers enable several computers or gaming devices to play multiplayer games. Personal computers or gaming consoles are their clients.

Mail Server
These servers make email communication possible in the same way as a post office makes snail mail communication possible. Clients of these servers are senders and recipients of email.

Print Server
These servers share one or more printers over a network which eliminates the hassle of physical access. Their clients are computers in need of printing something.

Proxy Server
This server acts as an intermediary between a client and a server accepting incoming traffic from the client and sending it to the server.

Reasons to use a proxy server include content control and filtering, improving traffic performance, preventing unauthorized network access, simply routing the traffic over a large and complex network. Their clients are any networked computer.

Web Server
These servers host web pages. A web server is responsible for making the World Wide Web possible. Each website has one or more web servers. Their clients are computers with a web browser.

404 Not Found
The HTTP 404 Not Found client error response status code indicates that the server cannot find the requested resource. Links that lead to a 404 page are often called broken or dead links and can be subject to link rot.

A 404 status code only indicates that the resource is missing without indicating if this is temporary or permanent. If a resource is permanently removed, servers should send the 410 Gone status instead.

404 errors on a website can lead to a poor user experience for your visitors, so the number of broken links (internal and external) should be minimized to prevent frustration for readers. Common causes of 404 responses are mistyped URLs or pages that are moved or deleted without redirection. For more information, see the Redirections in HTTP guide.

** Custom error page in Apache**
For the Apache server, you can specify a path to a custom 404 page in a .htaccess file. The example below uses notfound.html as a page to show visitors on 404s, although a common approach is to name the file 404.html or 404.php (depending on the server-side technology) at the top-level of the server

- Apache HTTP Server
The Apache HTTP Server is a free, open-source cross-platform web server managed by the Apache Software Foundation. It powers millions of websites globally by processing HTTP requests and delivering content over the internet. It is highly valued for its reliability, flexible configuration, and extensive module support
A fast, reliable, and extensible open-source web server for modern operating systems.

- Flexible configuration — .htaccess per-directory config, virtual hosts, dynamic module loading.
- Security — TLS/SSL, authentication modules, fine-grained access control.
- Performance — event MPM, HTTP/2, content caching, reverse proxy.
- Extensibility — 100+ modules for rewriting, proxying, load balancing, scripting, and more.
- Portability — runs on Linux, Windows, macOS, and most Unix-like systems.

Refrence
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/404#custom_error_page_in_apache
https://www.geeksforgeeks.org/computer-networks/what-is-server/
https://httpd.apache.org/

Top comments (0)