Using Apache2 in Centos

I am using a centos linux and I have installed on it apache2.
When I used ubuntu I edited the file index.html in the library /var/www
However I have seen that this is not the case in centos, so how can I create my "index.html" in centos?
do I need to edit some configuration file and tell it where is the index.html or what file it should load when someone try to access the IP in port 80?

Hi.

The default "DocumentRoot" in CentOS (like Redhat) is /var/www/html.

You can set this to whatever you like by changing the "DocumentRoot" in /etc/httpd/conf/httpd.conf

1 Like

thanks.