-   Linux - Software (
-   -   No htdocs for Apache (

animelook 08-04-2006 06:31 PM

No htdocs for Apache
I installed Apache (with PHP) on my Debian system using this:

apt-get install apache2 libapache2-mod-php4
However, I can't seem to find the webroot folder... isn't it usually /var/www/htdocs?

Any help is appreciated.


pljvaldez 08-04-2006 06:40 PM

If you mean the document root, you can check the file /etc/apache2/sites-available/default.

animelook 08-04-2006 06:52 PM

I did a whereis search on "sites-available", but it came up with nothing.

pljvaldez 08-04-2006 06:57 PM

I think whereis only finds commands, man whereis.

I'm using Debian Sarge and for apache2, the document root is /var/www as defined in the file /etc/apache2/sites-available/default

animelook 08-04-2006 07:06 PM

I'm sorry- I didn't understand what you mean.

It appears to be /var/www for me as well.


haertig 08-04-2006 07:37 PM

A default compile and configuration of Apache will set you up for that htdocs directory you're used to. However, if you're not compiling it yourself and are installing it from some distro's packaging system, all the defaults may have been changed.

On my Debian box with Apache installed from a package, my main config file is not the expected httpd.conf -- it's apache2.conf. This was probably set by the package maintainer in the configure script or somewhere else during compilation.

My apache2.conf contains the line "Include /etc/apache2/sites-enabled/[^.#]*" so I then go look at /etc/apache2/sites-enabled/000-default (the only file in that directory). Inside that file I find what I'm looking for, a directive that says "DocumentRoot /var/www"

These are not standard Apache defaults, they were evidently chosen by the package maintainer. I'm sure you're running into a similar situation.

All times are GMT -5. The time now is 04:29 PM.