[Lincs] Apache Configuration
James Taylor
jt at imen.org.uk
Tue Dec 14 09:52:52 GMT 2004
Ben Francis wrote:
> Chris Marr wrote:
>
>> Apache config: How do you remove the test page that it defaults to,
>> and make the server give a directory listing?
>
>
> That depends on what distribution you're running, but certainly Debian
> uses /var/www/ as the default document root. You can find the Document
> root in the Apache config file, try "less /etc/apache/httpd.conf |
> grep DocumentRoot" for Apache 1.3 or less /etc/apache2/apache2.conf |
> grep DocumentRoot" for Apache 2
>
> By deleting the index file from this directory you'll probably find
> you'll get a directory listing. Either that or simply renaming (using
> mv) the index file is probably the safest bet.
>
> I wouldn't go for editing the apache config for this, but if you do
> you might want to run "apachectl configtest" before restarting apache.
> Or you can run "apachectl graceful" which is a safer way of restarting
> apache and will check for a broken configuration first.
>
The only thing you should be careful of is not just the document root
but the directory access, (the bits in the "<directory >" settings. You
should have a default one ("<directory />") but you should also have one
for your Document Root - "<directory /var/www/>" - When you change your
Document Root you have to change the Directory respect. And in here you
can place the same overrides that you would place in your .htaccess (all
just depends on your preference of setting things out).
> If you put all the web pages and directories in the /var/www/ or
> equivalent directory, as long as there is no index file you'll get a
> list of the files and directories like this.
>
Only if you have the option Indexes in the "Options" option, otherwise
you get erm. 40? Forbidden? (not sure) (see previous post)
More information about the Lincs
mailing list