Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed apache by this:

apt-get install apache2 apache2-doc apache2-utils

and server is running, but unfortunately when I create index.html file in /var/www there is still result: "404 Not Found". File httpd.conf is empty and in apache.conf I don't see any folder to configure.

share|improve this question
add comment

4 Answers 4

logs will be found in /var/log/apache2

the default doc root is /var/www and this should be setup correctly

how are you trying to access the site in your browser?

share|improve this answer
    
these folders were correct previously when I first login to my server (vps) but when I remove and add apache2 (apt-get remove / apt-get install) there are not valid. –  proc Apr 6 '11 at 14:33
    
unless you edited /etc/apache2/apache2.conf or /etc/apache2/sites-enabled/000-default then it should work correctly, i suggest you may have another issue with your server/configuration if a remove and isntall broke your webserver –  anthonysomerset Apr 6 '11 at 14:37
add comment

You should check in /etc/apache2/sites-enabled/000-default. This is where you will find the DocumentRoot and other directives.

share|improve this answer
    
httpd.conf and all 5 folders in /etc/apache2 are empty. –  proc Apr 6 '11 at 14:31
    
How was the server installed? Did you use your favorite's distribution package manager? I think there is a deeper issue than this. –  saalaa Apr 6 '11 at 15:24
add comment

Check configuration file in /etc/apache2/sites-enabled/

In last lines of defualt configuration file (apache2.conf) there is an Include statement

# Include the virtual host configurations:
Include sites-enabled/
share|improve this answer
    
this folder is empty after apt-get install apache2 –  proc Apr 6 '11 at 14:34
    
actually I just installed apache after seeing your post and I have 000-default in sites-enabled/ . :( –  Suku Apr 6 '11 at 14:57
add comment

Your server does not look like it has been correctly installed. Did you get any error when you installed Debian or apache2? If so, you should re-install Debian. If apache was the one with the error, you should do (assuming you are root):

apt-get update ## to make sure that you have the latest repository details
apt-get upgrade ## to make sure your server is up to date (no incompatibilities or other)
apt-get purge apache2 ## completely remove apache and any other config files related to it
apt-get install apache2 ## re-install apache

Then, you can edit your default configurations that are found in /etc/apache2/sites-enabled/000-default, using an editor. If the config file is still missing, look back at the installation logs, maybe there was a certain error that you have missed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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