CentOS quick installation, configuration Web server (Apache)
In this article, we will learn how to quickly build a Web server.
Install Apache server
First, log in to the Linux server.
Install using yum:
yum install httpd -y
Start service
service httpd start
Add the Apache service to the startup
systemctl start httpd
systemctl enable httpd
Check whether the setting is successful:
systemctl list-unit-files | grep httpd
display:
httpd.service enabled
Indicates that the auto-start is successfully set after booting.
test
In the browser, enter the ip address of the server, if the following page appears, the configuration is successful.
Home page modification
All Apache configuration files are located in /etc/httpd/conf and /etc/httpd/conf.d. The default website data is located under /var/www/html, which can be changed by modifying the /etc/httpd/conf/httpd.conf file.
In this example, we will create an index.html file under the /var/www/html directory, which will serve as the default homepage of the website:
cd /var/www/html
vim index.html
Enter budaya in index.html, and then you can see the new homepage in the browser.
PS: For more more content..., please check --> "Server Development"
PS: More more content..., please check --> "Server Development"
PS: More more content..., please check --> "Server Development"