apacheubuntu

How to run my html file with apache2


Maybe it is not a right channel to ask this question but I donot know where to ask.

I want to know how to run html file with apache on my ubuntu. I have written program with javascript and a html file and I want to run it via apache. I could not find htdocs folder in to copy my files there beside that I do not have permission to do that in ubuntu. My apache is installed in /usr/share/apache2. When I write http://localhost it says:

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.

but I do not know where to add the contents.

any help.


Solution

  • The default folder that it serves the HTML files from is /var/www.

    For example, /var/www/test.html would be http://localhost/test.html.