Before setting up a server we must know the real meaning or definition of a server. So, the Server is a program that provides the client with any kind of services. For example, a web server provides our websites, a database server provides us data. This means every server has work to do and for every different work we want them to do, we have to choose different servers.
For knowing more about servers and their working click here. To check more about dockers – click here.
- Linux Operating system Like Ubuntu, Redhat, Kali Linux.
- Internet connectivity
- Docker installed on system
What we are going to do VISUAL:
Let’s now understand the installation and configuration.
3 steps to configure a Web Server
- Install the Server Program
- Configuration of Server
- Start the server
Installing the Server Software
Start docker services.
systemctl start docker
Open the docker container, you can use centos 7 images to launch.If you don’t have centos images you can download it from the www.hub.docker.com
docker run -it --network host centos:7
We are going to use HTTPD server.It could be installed using YUM command and DNF if you are using RHEL 8.
yum install httpd
Configuring the Web server
Actually the server is already been configured and now its the time to update or make a website over this server.Server website can be accessed using the IP address of the host.
In this directory you could save your website and it would be available over the network.
Start the server
systemctl start httpd
If this doesn’t start the server, try this
Access the content of website
To access the content of the webserver you must know the ip address, which could be known using “ifconfig” command.And then do the further steps.
curl http://IP of host/page_name.html
- What to do when load on a Linux based web server goes high?
- How to Setup Browsersync for Web Development in Ubuntu?
- How to setup firewall in Linux?
- How to setup Proxychains in Linux without any Errors?
- Setup Terraform On Linux and Windows Machine
- How to Install and Configure Docker in Ubuntu?
- Create your own secure Home Network using Pi-hole and Docker
- Exposing Localhost Server over Internet Using ngrok and VS Code
- Using Lynx to Browse the Web From the Linux Terminal
- Kali Linux - Web Penetration Testing Tools
- How to setup cron jobs in Ubuntu
- Lab Setup For Malware Analysis
- Linux Virtualization : Linux Containers (lxc)
- Difference Between Arch Linux and Kali Linux
- TCP Server-Client implementation in C
- UDP Server-Client implementation in C
- UDP Client Server using connect | C implementation
- How to Secure a Live Server?
- How to find time taken by a command/program on Linux Shell?
- Terminal Mail and Linux Security Mail
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.