View Single Post

   
  #2 (permalink)  
Old 01-27-2008, 09:17 AM
Tony van der Hoff
 
Posts: n/a
Default Re: Apache2 Document Directory

On 25 Jan at 1:40 "Charles Chambers" <cchamb2@hotmail.com> wrote in message
<13pife92rdragdf@news.supernews.com>

> Can someone point me to where in Deb 4.0 / Apache2 to connfigure the
> default directory??
>
> I try browsing from a different computer on the LAN, and I get page cannot
> be displayed.
>
> I try http://localhost and I get "It works!" (but the default in
> /var/www/apache2-default is gone...see below). But MediaWiki, phpBBS3,
> WebMin, UserMin, and VirtualMin all work.
>
> I've copied a *very* basic site in /var/www/apache2-default and
> /var/www/localhost, and I've changed the DocumentRoot in
> /etc/apache2/sites-enabled/default to /var/www/localhost.
>


Yes, I've just been through the same exercise

It's at /etc/apache2/sites-available/default.
This is my modified file; adapt it to your site. Hope it helps:

***********************************************
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@magpieway.net

DocumentRoot /home/www/html

# <Directory />
# Options FollowSymLinks
# AllowOverride None
# Deny from all
# </Directory>

<Directory /home/www/html>
Options Indexes FollowSymLinks MultiViews Includes
XBitHack on
AllowOverride All
Order deny,allow
#Allow from all
Deny from all
#Allow from 192.168.10
#Allow from 127.0.0.1

# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right
place
#RedirectMatch ^/$ /apache2-default/
</Directory>

<Directory /home/*/public_html>
AllowOverride All
Options MultiViews -Indexes Includes FollowSymLinks

Order allow,deny
Allow from all
</Directory>

<Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script

Order allow,deny
Allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
Allow from 192.168.10
Allow from 127.0.0.1
</Directory>

Alias /tmp /tmp
<Directory /tmp>
# CGI scripts need access here
options none

# deny to all by default
Order deny,allow
Deny from all

# allow access from local net
Allow from 127.0.0.1
Allow from 192.168.10
#ErrorDocument 403 "This directory can only be viewed from the local
network."
</Directory>

</VirtualHost>
***********************************************

--
Tony van der Hoff | mailto:news_0711@vanderhoff.org
Buckinghamshire, England
Reply With Quote