httpd stands for HTTP Daemon, which is a web server software that handles HTTP (Hypertext Transfer Protocol) requests from clients (typically browsers) and serves web content (like HTML, images, CSS, etc.) in response
- It's a daemon: a background process that continuously runs on a server.
- It listens on a network port (default: port 80 for HTTP, 443 for HTTPS) and handles incoming HTTP requests.
- Most commonly, it refers to Apache HTTP Server, but "httpd" can also generically mean any HTTP server daemon.
You can install it on your server. Below are the steps to install and configure HTTPS
- check the ip adress - hostname -I
- Install Apache (HTTPD)
yum install httpd -y
- Edit the main Apache configuration file:
vi /etc/httpd/conf/httpd.conf
Ensure the following basic settings are present and correct:
ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
DirectoryIndex index.html
These are usually set by default, but it's good to verify.
- cd /var/www/html
Create a basic HTML file to test Apache:
- vi index.html
<!DOCTYPE html>
<html>
<head>
<title>Apache is Working</title>
</head>
<body>
<h1>Welcome to Apache!</h1>
</body>
</html>
- systemctl start httpd
systemctl enable httpd
Now open your browser and enter your server’s IP address:http://YOUR_IP_ADDRESS
If the page doesn’t load:
systemctl stop firewalld or you can allow the http
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
- To change the port Apache listens on:
vi /etc/httpd/conf.d/vhost.conf
Inside that file, set something like:
<VirtualHost *:8080>
DocumentRoot "/var/www/html"
</VirtualHost>
Now restart the httpd and check in the browser with your IP