how to replace this file (located at /var/www/html/index.html) in Apache2 installed through LAMP in ubuntu 18.04 whenever I tried to open any .html or .php file it shows this error "Not Found

The requested URL ..... was not found on this server.

Apache/2.4.29 (Ubuntu) Server at localhost Port 80"

and at localhost port 80 "Apache Ubuntu default page It works! " opened

1 Answer 1


Not by opening a website addres in your browser but by logging into the server and doing

cd /var/www/html
vi index.html

Or if it is a desktop you can also do

gedit index.html

(apply sudo if needed)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.