DEV Community

yubaraj singh
yubaraj singh

Posted on

Hosting website from centos

  • Install http using command
    sudo yum install httpd

  • check status of server
    systemctl status httpd

  • start the httpd service
    sudo systemctl enable httpd
    sudo systemctl start httpd

the go the /var/www/html/
cd /var/www/html

create new index.html
vi index.html

write html code here and save the code

now your site is hosted in your ip or localhost.

Top comments (0)