Re: [Hampshire] Apache2 configuration

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Apache2 configuration

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x5802a100.hantslug.org.uk.28120': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Mon Apr 2 13:21:50 2007 BST
gpg: using DSA key B2C27BC21C335860
gpg: Can't check signature: No public key
On Mon, Apr 02, 2007 at 12:56:28PM +0100, John Lewis wrote:
> I am have problems getting apache to display a web page
> with "URL /exodus not found" error.
>
> I had previously been able to display the default "It works!" page
> from /var/www indicating apache2 was actually working
>
> I had edited /etc/apache2/sites-available/default so it reads
> >
> DocumentRoot /home/jayell/public_html/exodus
> >
> <Directory /home/jayell/public_html/exodus>
> >
>
> but left everything else alone.
>
> I'd first played about with editing httpd.conf but then found a
> mention on-line that Debian Apache2 doesn't really use httpd.conf
> file but apache2.conf instead.
>
> It doesn't look as though I need to edit anything in apache2.conf.
>
> The "DocuumentRoot" contains various *.php files including index.php
>
> I restarted apache2 after editing the /sites available/default file.
>
> What have I missed?


I think a bit more of the config file is necessary to debug this
entirely, but: DocumentRoot is the directory on your filesystem which
maps to the *root* of your website. Thus, if you have

DocumentRoot /home/jayell/public_html/exodus
<Directory /home/jayell/public_html/exodus>
...
</Directory>

you will find that http://localhost/ will show the contents of the
exodus directory, and you won't be able to see the other contents of
/home/jayell/public_html.

If you want to map /home/jayell/public_html to the web root, then
use that path, and your exodus directory will appear under
http://localhost/exodus.

If you want something more complex (/var/www maps to the document
root, but /home/jayell/public_html/exodus appears in
http://localhost/exodus, say), then this can be done as well -- but I
won't go into it unless you want that configuration.

Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 1C335860 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
      --- This chap Anon is writing some perfectly lovely stuff ---      
                             at the moment.