Where can I change the webpage shown by apache?

I have ubuntu 10.10 installed, and when I hit my IP I see:

It works!

This is the default web page for this server.

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

Where should I look to see where this is being served from?

The strange thing is, I just installed nginx and setup a static page that is served on port 80 also (should be conflicting with the default apache that is serving the 'it works page'), when I restart nginx I don't get bind error sayign port 80 is already taken.

I dont' use apache, and don't want it but the default install seems to have it. I ahve no idea where it is, I don't see it in /opt or etc/apache .

thanks!


Solution 1:

you can put your webpage in /var/www/ you will need sudo access to be able to change anything there.

These are your options to do so.

1. Use mv on a file

You could use the terminal and the command mv.

Example:

  1. cd /var/www/
  2. mv ~/Desktop/FILENAME.html .

The dot isn't a misstake, it's that the destination is the current folder.

2. use a text editor

Another way to do it is just to open gedit (or any other editor) and save your file in /var/www/.

if you want to remove apache you could just type sudo apt-get remove apache in a terminal. If you are using apache2 then add a 2to the ending.

3. Make a link to the root folder

And if you are tired of having to use the root user to add a new webpage document, jsut make a link. Configuring Permissions for FTP and Apache


By the way, you don't need to go to your IP, you can just go to your localhost in your browser. If you have several files in your folder, just add a file name like this: localhost/myfile.html

Solution 2:

By default when to tell your browser to display "localhost" Apache will look in /var/www for a site to display. After a new Apache install it will find an index.html file. That is the file that displays the message you see. Index.html is the name normally used for the home page of a site. If no index.html file is in /var/www a directory listing of the files there will be displayed. You can replace the original index.html with an HTML file of your own. Don't forget that /var/www is owned by root.