You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Evje <se...@shawcable.com> on 2002/11/16 00:29:31 UTC

[users@httpd] Directory Configuration

Hello Joshua;

New to Apache, Here is the problem that I outlined previously.

A person has his webpages in a directory on http://www.xyz.com (in
htdocs)(no domain name so no VirtualHost involved).

The url is as follows:
http://www.xxx.com:8080/directoryname/index/abcd.html (don't ask me
why??)

How can I set up the directory in Apache httpd config to go to this url
http://www.xyz.com:8080/directoryname/ without the directory listing
showing and without having to add the /index/abcd.html 

I tried the following and it still shows the directory contents.

<Directory "C:/Apache2/htdocs/directoryname">
     DirectoryIndex index/abcd.html
     Options Indexes
     AllowOverride AuthConfig Options Fileinfo
     Order Allow,Deny
     Allow from all
</Directory>

I also tried:

<Directory "C:/Apache2/htdocs/directoryname/index">
     DirectoryIndex index/abcd.html
     Options Indexes
     AllowOverride AuthConfig Options Fileinfo
     Order Allow,Deny
     Allow from all
</Directory>

I tried the following which you suggested and it doesn't work:

<Directory /path/to/docroot/directoryname>
DirectoryIndex index/abcd.html
</Directory>

You may also want to add
<Directory /path/to/docroot/directoryname/*>
DirectoryIndex index.html
</Directory>
to turn it back to normal in the subdirectories.

There are several other ways to do the same thing using
Alias/RewriteRule/etc, but I think that is the simplest.

Thanks in advance for your help and patience. :-)

Selmer Ausland

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Directory Configuration

Posted by Evje <se...@shawcable.com>.
Hello Joshua;
     Got it working now, you were right again. Really appreciate your
patience.

Thanks.  

Selmer 

Joshua Slive wrote:

> >
> > I tried the following and it still shows the directory contents.
> >
> > <Directory "C:/Apache2/htdocs/directoryname">
> >      DirectoryIndex index/abcd.html
> 
> That's odd.  Perhaps relative paths don't work.  Two alternatives:
> DirectoryIndex /directoryname/index/abcd.html
> or
> AliasMatch ^/directoryname/$ "c:/Apache2/htdocs/directoryname/index/abcd.html"
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 
JKCC Consulting
http://jkcc.com/

Memories Of Deep River
http://www.jkcc.com/evje/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Directory Configuration

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 15 Nov 2002, Evje wrote:
> A person has his webpages in a directory on http://www.xyz.com (in
> htdocs)(no domain name so no VirtualHost involved).
>
> The url is as follows:
> http://www.xxx.com:8080/directoryname/index/abcd.html (don't ask me
> why??)
>
> How can I set up the directory in Apache httpd config to go to this url
> http://www.xyz.com:8080/directoryname/ without the directory listing
> showing and without having to add the /index/abcd.html
>
> I tried the following and it still shows the directory contents.
>
> <Directory "C:/Apache2/htdocs/directoryname">
>      DirectoryIndex index/abcd.html

That's odd.  Perhaps relative paths don't work.  Two alternatives:
DirectoryIndex /directoryname/index/abcd.html
or
AliasMatch ^/directoryname/$ "c:/Apache2/htdocs/directoryname/index/abcd.html"

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org