summary
Install the web server software Apache in a Linux environment.
Apache installation
What is Apache?
It is one of the most famous “Web server software” in the world.
The web server software accepts HTTP requests from clients.
Executes a script language such as PHP in response to a request and responds the execution result to the client.
Check software package “httpd”
Check the apache package.
sudo dnf module list httpd
Software package installation
Install the default v2.4.
sudo dnf -y install httpd
Confirmation after installation
httpd -v
Apache startup
Use the “systemctl” command to start Apache.
Execute the command to execute the command.
sudo systemctl enable --now httpd
Check the status.
systemctl status httpd
Change firewall settings
Open the port that accepts https requests from the outside.
sudo firewall-cmd --zone=public --add-service=http --permanent
Reboot firewall
sudo firewall-cmd --reload
Check firewall
sudo systemctl status firewalld
Access the web server
Access the web server from the web browser (Edge, chrome) of the host OS.
http://{Web server IP}:80/
If the IP of the Web server is “192.168.0.100”, it will be as follows.
http://192.168.0.100:80/
Apache has been successfully installed.