You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Eugene <ht...@infosatgeomatica.com> on 2004/09/29 09:18:30 UTC

[users@httpd] ___Close xml for reading from browser. how?

Hello Users! I'm using xml files like configuration files for servlets. Is it
possible to prevent these xml's from reading in browser but do not close access to
servlet for read these files. Any ideas how to achieve this? The same topic will post
in Tomcat Users too just in case.

Thanks in advance!

-- 
Best regards,
 Eugene                          mailto:httpd.subscribe@infosatgeomatica.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: AW: Re[2]: [users@httpd] ___Close xml for reading from browser. how?

Posted by Eimantas Vaiciunas <ei...@sc.vu.lt>.
On Wednesday 29 September 2004 19:25, Steffen Heil wrote:
> The directive above is an apache directive, which prevents apache to access
> these files. However servlet requests are passed from apache to tomcat,
> which has no idea at all about apache's configuration. Therefor the servlet
> would still be able to access the file. The problem is, that all other
> non-servlet-config-xml-files on the site would be blocked also.
Well then only thing i can think of is to put all servlet-config-xml files to 
separate directory and then add apropriate directives to httpd.conf file 
applying same 'permissions' to the whole directory contents.
-----
Eimis

---------------------------------------------------------------------
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


AW: Re[2]: [users@httpd] ___Close xml for reading from browser. how?

Posted by Steffen Heil <li...@steffen-heil.de>.
Hi

>> <Files ~ "\.xml$">
>>   Order deny,allow
>>   Deny from all
>> </Files>

> Hello Eimantas, thanks. The problem is here that servlet in this case can
not access to this file too. Thanks anyway!

NO.
The directive above is an apache directive, which prevents apache to access
these files. However servlet requests are passed from apache to tomcat,
which has no idea at all about apache's configuration. Therefor the servlet
would still be able to access the file. The problem is, that all other
non-servlet-config-xml-files on the site would be blocked also.

Regards,
  Steffen

Re[2]: [users@httpd] ___Close xml for reading from browser. how?

Posted by Eugene <ht...@infosatgeomatica.com>.
Hello Eimantas, thanks. The problem is here that servlet in this case
can not access to this file too. Thanks anyway!

Wednesday, September 29, 2004, 7:24:08 AM, you wrote:

> On Wednesday 29 September 2004 07:18, Eugene wrote:
>> Hello Users! I'm using xml files like configuration files for servlets. Is
>> it possible to prevent these xml's from reading in browser but do not close
>> access to servlet for read these files. Any ideas how to achieve this? The
>> same topic will post in Tomcat Users too just in case.
> Try:
> =============
> <Files ~ "\.xml$">
>   Order deny,allow
>   Deny from all
> </Files>
> =============
> -----
> Eimis

> ---------------------------------------------------------------------
> 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



-- 
Best regards,
 Eugene                            mailto:httpd.subscribe@infosatgeomatica.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] ___Close xml for reading from browser. how?

Posted by Eimantas Vaiciunas <ei...@sc.vu.lt>.
On Wednesday 29 September 2004 07:18, Eugene wrote:
> Hello Users! I'm using xml files like configuration files for servlets. Is
> it possible to prevent these xml's from reading in browser but do not close
> access to servlet for read these files. Any ideas how to achieve this? The
> same topic will post in Tomcat Users too just in case.
Try:
=============
<Files ~ "\.xml$">
  Order deny,allow
  Deny from all
</Files>
=============
-----
Eimis

---------------------------------------------------------------------
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: AW: [users@httpd] ___Close xml for reading from browser. how?

Posted by Eugene <ht...@infosatgeomatica.com>.
Hello Steffen, WOW! Probably, I should take some vacations:) Thats a
great idea actually! Thanks!


Wednesday, September 29, 2004, 4:25:31 AM, you wrote:

> Hi

>> Hello Users! I'm using xml files like configuration files for servlets. Is
>> it possible to prevent these xml's from reading in browser but do not close
>> access to servlet for read these files.

> Put these files in the webapps WEB-INF folder.
> Everything there should be readable from the servlet, but if anything is
> readable in browser, your configuration is flawed.

> Regards,
>   Steffen



-- 
Best regards,
 Eugene                            mailto:httpd.subscribe@infosatgeomatica.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


AW: [users@httpd] ___Close xml for reading from browser. how?

Posted by Steffen Heil <li...@steffen-heil.de>.
Hi

> Hello Users! I'm using xml files like configuration files for servlets. Is
it possible to prevent these xml's from reading in browser but do not close
access to servlet for read these files.

Put these files in the webapps WEB-INF folder.
Everything there should be readable from the servlet, but if anything is
readable in browser, your configuration is flawed.

Regards,
  Steffen