You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Paul Yunusov <py...@rogers.com> on 2003/08/07 17:28:36 UTC
[users@httpd] DirectoryIndex ignored
I have the following virtual host entry in httpd.conf:
<VirtualHost 127.0.0.1>
DocumentRoot /var/www/somesite/htdocs
ServerName somesite.local
<Directory "/var/www/somesite/htdocs">
Options +Includes +Indexes
DirectoryIndex /webapp1/data/index
</Directory>
</VirtualHost>
When I try to access "http://somesite.local/", I get the "/" directory index
rather than the page "http://somesite.local/webapp1/data/index".
What could be the possible reason for this ingnoring of the DirectoryIndex
entry in the configuration above?
Thanks,
Paul
---------------------------------------------------------------------
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] DirectoryIndex ignored
Posted by Paul Yunusov <py...@rogers.com>.
On August 7, 2003 02:41 pm, Doug Krause wrote:
> > I would like to use a resource at a path like "/webapp1/data/index" as an
> > index page for the "/" directory, which is exactly what the
> > DirectoryIndex directive is supposed to accomplish.
> >
> > My question is why this is not happening in my case.
>
> Don't you use Directory to point to /webapp1/data/index and then
> DirectoryIndex to point to a specific file (or list of files) to
> load? You are using DirectoryIndex to point to a directory.
According to the Apache docs, the DirectoryIndex directive takes URLs, which
do not necesserily have to point to files. "/webapp1/data/index" is a valid
URL, and that's why I befuddled why it's ignored at request-time.
Paul
---------------------------------------------------------------------
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] DirectoryIndex ignored
Posted by Doug Krause <di...@ratcage.com>.
> I would like to use a resource at a path like "/webapp1/data/index" as an
> index page for the "/" directory, which is exactly what the DirectoryIndex
> directive is supposed to accomplish.
>
> My question is why this is not happening in my case.
Don't you use Directory to point to /webapp1/data/index and then
DirectoryIndex to point to a specific file (or list of files) to
load? You are using DirectoryIndex to point to a directory.
--
Doug Krause
dijon@ratcage.com
---------------------------------------------------------------------
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] DirectoryIndex ignored
Posted by Paul Yunusov <py...@rogers.com>.
On August 7, 2003 12:45 pm, Ben-Nes Michael wrote:
> Check
> Redirect directive
>
> http://httpd.apache.org/docs/mod/mod_alias.html#redirect
As far as I know, the Redirect directive will result in redirection to a
certain URL of every URL path that begins with "/" in my case, which will
lead to recursive redirection. Besides, the implication of redirection is
that a certain resource has moved which is not true in my case, although
redirection may seem to produce the desired effect.
I would like to use a resource at a path like "/webapp1/data/index" as an
index page for the "/" directory, which is exactly what the DirectoryIndex
directive is supposed to accomplish.
My question is why this is not happening in my case.
Thanks,
Paul
> ----- Original Message -----
> From: "Paul Yunusov" <py...@rogers.com>
> To: <us...@httpd.apache.org>
> Sent: Thursday, August 07, 2003 5:28 PM
> Subject: [users@httpd] DirectoryIndex ignored
>
> > I have the following virtual host entry in httpd.conf:
> >
> > <VirtualHost 127.0.0.1>
> > DocumentRoot /var/www/somesite/htdocs
> > ServerName somesite.local
> > <Directory "/var/www/somesite/htdocs">
> > Options +Includes +Indexes
> > DirectoryIndex /webapp1/data/index
> > </Directory>
> > </VirtualHost>
> >
> > When I try to access "http://somesite.local/", I get the "/" directory
>
> index
>
> > rather than the page "http://somesite.local/webapp1/data/index".
> >
> > What could be the possible reason for this ingnoring of the
> > DirectoryIndex entry in the configuration above?
> >
> > Thanks,
> >
> > Paul
> >
---------------------------------------------------------------------
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] DirectoryIndex ignored
Posted by Ben-Nes Michael <mi...@canaan.co.il>.
Check
Redirect directive
http://httpd.apache.org/docs/mod/mod_alias.html#redirect
--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
Fax: 972-4-6990098
http://www.canaan.net.il
--------------------------
----- Original Message -----
From: "Paul Yunusov" <py...@rogers.com>
To: <us...@httpd.apache.org>
Sent: Thursday, August 07, 2003 5:28 PM
Subject: [users@httpd] DirectoryIndex ignored
> I have the following virtual host entry in httpd.conf:
>
> <VirtualHost 127.0.0.1>
> DocumentRoot /var/www/somesite/htdocs
> ServerName somesite.local
> <Directory "/var/www/somesite/htdocs">
> Options +Includes +Indexes
> DirectoryIndex /webapp1/data/index
> </Directory>
> </VirtualHost>
>
> When I try to access "http://somesite.local/", I get the "/" directory
index
> rather than the page "http://somesite.local/webapp1/data/index".
>
> What could be the possible reason for this ingnoring of the DirectoryIndex
> entry in the configuration above?
>
> Thanks,
>
> Paul
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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] DirectoryIndex ignored
Posted by Paul Yunusov <py...@rogers.com>.
On August 10, 2003 01:02 pm, Ezra wrote:
> Hello Paul:
>
> FIRST OF ALL, YOU SHOULD NEVER GET / . This is a security issue, your
> letting the world see your filesystem, and that's a no-no. Second, are
> you sure the file you want viewed(by the world or who ever) is in the
> url you listed. If not, create it.
>
>
> Thank You
> Ezra Taylor
Thanks, Ezra. "/" stood for the server's document root in my case, not the
filesystem's root. As for the URL "/webapp1/data/index", it works when
accessed directly. That page is generated by an application server, to which
this URL is handed by Apache based on /webapp1/data/* pattern matching.
Paul
>
> Paul Yunusov wrote:
> > I have the following virtual host entry in httpd.conf:
> >
> > <VirtualHost 127.0.0.1>
> > DocumentRoot /var/www/somesite/htdocs
> > ServerName somesite.local
> > <Directory "/var/www/somesite/htdocs">
> > Options +Includes +Indexes
> > DirectoryIndex /webapp1/data/index
> > </Directory>
> > </VirtualHost>
> >
> > When I try to access "http://somesite.local/", I get the "/" directory
> > index rather than the page "http://somesite.local/webapp1/data/index".
> >
> > What could be the possible reason for this ingnoring of the
> > DirectoryIndex entry in the configuration above?
> >
> > Thanks,
> >
> > Paul
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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] DirectoryIndex ignored
Posted by Ezra <ez...@acedsl.com>.
Hello Paul:
FIRST OF ALL, YOU SHOULD NEVER GET / . This is a security issue, your
letting the world see your filesystem, and that's a no-no. Second, are
you sure the file you want viewed(by the world or who ever) is in the
url you listed. If not, create it.
Thank You
Ezra Taylor
Paul Yunusov wrote:
> I have the following virtual host entry in httpd.conf:
>
> <VirtualHost 127.0.0.1>
> DocumentRoot /var/www/somesite/htdocs
> ServerName somesite.local
> <Directory "/var/www/somesite/htdocs">
> Options +Includes +Indexes
> DirectoryIndex /webapp1/data/index
> </Directory>
> </VirtualHost>
>
> When I try to access "http://somesite.local/", I get the "/" directory index
> rather than the page "http://somesite.local/webapp1/data/index".
>
> What could be the possible reason for this ingnoring of the DirectoryIndex
> entry in the configuration above?
>
> Thanks,
>
> Paul
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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