A web server is a computer program that sends web pages to your browser when you ask for them.
This guide is for students, people new to IT work and anyone who owns a website. You do not need to run a server yourself to be affected: if you have a website, a web server sits behind it, and its settings decide what the world can see.
In short
- A web server receives requests from browsers and sends back pages, pictures and files.
- Apache and NGINX are two well-known web server programs. Many websites run on one of them.
- By default, a web server may hand out any file it can reach, so settings decide what stays private.
- Keep the server updated, show only the files you mean to share, use HTTPS and watch the logs.
What you will learn
- Explain what a web server does in one sentence.
- Spot a web server showing files it should keep private.
- Check the basics your host or supplier should have in place.
- Page sender (web server)
- a program that answers requests from browsers by sending back pages and files.
- Web language (HTTP)
- the set of rules browsers and web servers use to talk to each other.
- Visit record (access log)
- a file where the server notes each request it receives.
What is a web server?
Think of a shop counter. You ask the assistant for an item. They go to the stockroom, find it and hand it over. If it is not there, they tell you so.
A web server does the same job for websites. When you type a web address, your browser sends a request across the internet. The web server finds the right page or file and sends it back. If it cannot find it, it sends an error, such as "404 Not Found".[1]
The word can mean the computer, the program running on it, or both.[1] This guide is mostly about the program. Well-known examples include the Apache HTTP Server and NGINX. Both are free to use and widely run.
Some sites only send files that already exist, such as pages and pictures. Others build each page as you ask for it, using an app and a database (a store of information, such as orders or bookings). The web server sits at the front in both cases.[1]
Where the comparison stops working: a shop assistant uses judgement. A web server follows its settings. If a private file sits where the server can reach it, the server may hand it to anyone who asks.[2]
Why does it matter?
The web server is the part of your site that the whole internet can reach. Anyone can send it requests. So can automatic tools that look for weak spots all day.
If you own a website
What could happen: a backup file left on the server is downloaded by a stranger, along with your customer list.
Check this: ask your host who updates the server and how private files are kept out of reach.
If you are studying IT or new to the job
What could happen: you set up a practice server with default settings and leave it open to the internet.
Check this: turn off anything you do not need, and switch the server off when you finish.
If you pay someone to build your site
What could happen: the site launches, but nobody is given the job of updating the server.
Check this: put updates and security checks in writing in your contract.
What does it look like?
Here is a made-up screen. It is what a browser might show if a web server lists a folder's contents instead of showing a page. This is called a directory listing.
Example only. All values are made up.
Index of /files (1) Name Size Parent Directory brochure-EXAMPLE.pdf 1.2M (2) site-backup-FAKE.zip 48M (3) old-settings-FAKE.bak 2K (4) https://www.example.com/files/
- The server found no home page in this folder, so it built a list of every file instead.
- A file the owner meant to share. This one is fine.
- In a real screen, a file like this could hold a full copy of the website and its data.
- In a real screen, an old settings file might contain passwords.
Why this is risky: anyone who finds the folder can download everything in it, not just the brochure. Apache creates these lists only when a setting allows it and the folder has no home page file.[3]
The safer way: keep backups and settings files off the public part of the server. Turn off automatic folder listings, and block files the public should not see.[2]
How does it work?
Here is what happens when you open a web page, in simple steps.
- The request. Your browser sends a request using HTTPS, the secure version of the web's language. It names the page it wants.
- The server receives it. The web server program checks its settings to see which folder or app should answer.[4]
- Files or app. For a simple page, the server sends a file from a folder. For a shop or booking page, it may pass the request to an app, which builds the page using the database.[1]
- The reply. The server sends the page back to your browser, or an error if it cannot.
- The record. The server writes a line about the request in its access log.

Sometimes a web server sits in front of other servers and passes requests on to them. This is called a reverse proxy. NGINX is often set up this way.[4]
Securing a web server comes down to a few habits. The Apache project's own security tips start with keeping up to date. They say many break-ins come from add-on code or the computer's operating system, rather than the web server program itself.[2] The project also publishes a list of every security problem fixed in each release.[5]

A worked example
Emil Fairweather runs Ochre Tutors, a fictional tutoring company with a small website. Parents use it to book lessons. A freelance developer, Odile Varga, built and hosts it.
One evening a parent emails Emil. "I clicked a link on your site and saw a list of files. One was called backup. Is that meant to be there?"
Emil remembers the shop counter. The assistant hands over whatever is in the stockroom, if nobody has said otherwise. He calls Odile.
Odile looks. The site's files folder has no home page, and folder listings are switched on. A backup of the booking database sits in that folder. She had put it there during a move and forgot to delete it.
She removes the backup from the public folder at once. She turns off folder listings and adds a rule that blocks backup and settings files.
Next, she checks the access log for downloads of the backup file. She finds two requests, one from the parent and one she cannot explain. So Emil treats it as a possible leak. He gets advice on whether he needs to tell parents and the data protection regulator.
Odile also changes the database password, in case the backup held it, and applies a waiting server update.
What made the difference: a parent who spoke up, and a log that showed what had happened.
Myths and mistakes
| What people think | What is true |
|---|---|
| If a file is not linked from my site, nobody can find it. | Folder listings, guessed names and scanning tools can reveal unlinked files. Keep private files off the public part of the server. |
| Our site is too small for anyone to bother. | Automated tools scan the internet for weak servers without caring who owns them. |
| The web server program is the only thing to update. | Apache's own tips say many break-ins come through add-on code or the operating system.[2] Update all of it. |
| HTTPS means the website is secure. | HTTPS protects data on the way. It does not fix weak settings or old software on the server. |
| Logs are only for experts. | Logs show what was asked for and when. They can tell you whether a private file was downloaded.[2] |
What can I do this week?
- Ask your host or developer which web server your site runs on and who updates it.
- Visit a few folders on your site, such as /files/ or /images/, and check that no file lists appear.
- Check that every page opens with HTTPS and a padlock in the address bar.
- Ask where backups are stored. The answer should not be the public website folder.
- Ask how long access logs are kept and who looks at them.
Checklist
- Someone is named as responsible for updating the web server and the computer it runs on.
- Updates are applied on a schedule, with urgent security fixes sooner.
- Automatic folder listings are turned off.
- Backups, settings files and old copies are kept out of the public folder.
- Every page uses HTTPS.
- Features the site does not use are switched off.
- Access logs are kept and checked for odd requests.
- Your contract with the host or developer covers updates and security checks.
Common questions
What is the difference between a web server and web hosting?
Web hosting is the service. The web server is the program doing the work. A hosting company rents you space on its computers, and a web server program on those computers sends your pages to visitors. On many hosting plans, the host looks after the web server for you.
Is Apache the same as NGINX?
No, they are different programs that do a similar job. Both can send web pages and pass requests on to other servers. They are set up in different ways, so security settings for one do not copy straight across to the other.
What does "404 Not Found" mean?
It means the web server could not find the page you asked for. The web address may be mistyped, or the page may have moved. It is a normal reply, and it is how the server tells your browser there is nothing at that address.
Do I need to manage a web server myself?
Usually not. Many small sites use hosting where the provider runs the web server. You still need to know who updates it, where backups go and whether folder listings are off. If you run your own server, those jobs are yours.
How do I know if my web server is out of date?
Ask your host or developer for the version number and compare it with the latest release on the project's own website. We suggest also asking when the computer underneath was last updated, because problems there can be just as serious.
Where next?
Ready for the detail? Read the practitioner guide: Apache HTTP Server Hardening Guide. It goes further into a hardening baseline, admin access and service accounts, and logging and detection for Apache.
Also useful:
- NGINX Security Hardening Guide
- How to find exposed .env, .git and config files on your web servers before attackers do
- TLS and HTTPS for Beginners
- Website Security for Beginners
Related NHI Mgmt Group resources: Web Server Access Log Detection Guide · Web Server End of Life · Web Application Firewalls for Beginners
Key terms
- Web server
- A program, or the computer running it, that answers browser requests by sending pages and files.
- Apache HTTP Server
- A widely used, free web server program from the Apache Software Foundation.
- NGINX
- A widely used web server program that is also often used to pass requests to other servers.
- HTTPS
- The secure version of the web's language, which encrypts traffic between a browser and a web server.
- Directory listing
- A page a web server builds to show every file in a folder that has no home page.
- Reverse proxy
- A server that receives requests from the internet and passes them on to other servers behind it.
- Access log
- A file where a web server records each request it receives.
Sources and further reading
- What is a web server? MDN Web Docs, Mozilla. https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_web_server, accessed 28 Nov 2026.
- Security Tips. Apache HTTP Server Version 2.4 Documentation, Apache Software Foundation. https://httpd.apache.org/docs/2.4/misc/security_tips.html, accessed 28 Nov 2026.
- Apache Module mod_autoindex. Apache HTTP Server Version 2.4 Documentation, Apache Software Foundation. https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html, accessed 28 Nov 2026.
- Beginner's Guide. nginx documentation. https://nginx.org/en/docs/beginners_guide.html, accessed 28 Nov 2026.
- Apache HTTP Server 2.4 vulnerabilities. Apache HTTP Server Project, Apache Software Foundation. https://httpd.apache.org/security/vulnerabilities_24.html, accessed 28 Nov 2026.