Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to block http access for selective URL's

Reply
Thread Tools

How to block http access for selective URL's

 
 
zigzagdna
Guest
Posts: n/a
 
      09-30-2011
I have several web sites under same installation of Apache Tomcat,
e.g.,
http://mycomputer.com/web-admin
http://mycomputer.com/teamacces
https://mycomputer.com/teamacces


What I want to do is to disallow http access to 2nd URL, but allow
http access to 1st URL. Where I look at server.xml, I can block http
access for all web sites under mycomputer.com but that is not what I
want, I still have to allow http access to 1st URL.
Is there a way to do it, if yes, how?
 
Reply With Quote
 
 
 
 
RavinderSingh RavinderSingh is offline
Junior Member
Join Date: Sep 2011
Posts: 2
 
      09-30-2011
Hi all,

I don't knw anything abt java programming bt i want to learn it....i m little confused hw to start and frm where to start....plzz sum1 plzzz refer me few best sites and few best books tht culd help me in learning java in much easier and best way.....
 
Reply With Quote
 
 
 
 
Jaap Droogers
Guest
Posts: n/a
 
      09-30-2011
On 30-09-11 03:09, schreef zigzagdna:
> I have several web sites under same installation of Apache Tomcat,
> e.g.,
> http://mycomputer.com/web-admin
> http://mycomputer.com/teamacces
> https://mycomputer.com/teamacces
>
>
> What I want to do is to disallow http access to 2nd URL, but allow
> http access to 1st URL. Where I look at server.xml, I can block http
> access for all web sites under mycomputer.com but that is not what I
> want, I still have to allow http access to 1st URL.
> Is there a way to do it, if yes, how?


I use my Apache HTTP server for this kind of access. It is not the most
advanced configuration, but for me it works fine.

In proxy.conf (from the HTTP server) I enter the following statements:
ProxyPass /hudson http://localhost:8080/hudson
ProxyPassReverse /hudson http://localhost:8080/hudson


My network firewall only forwards http (80) and https (443) to my
server, Tomcat listens to 8080 so it is not posible to acces Tomcat
direct from the outside world.

Jaap.
 
Reply With Quote
 
Arved Sandstrom
Guest
Posts: n/a
 
      09-30-2011
On 11-09-29 10:09 PM, zigzagdna wrote:
> I have several web sites under same installation of Apache Tomcat,
> e.g.,
> http://mycomputer.com/web-admin
> http://mycomputer.com/teamacces
> https://mycomputer.com/teamacces
>
>
> What I want to do is to disallow http access to 2nd URL, but allow
> http access to 1st URL. Where I look at server.xml, I can block http
> access for all web sites under mycomputer.com but that is not what I
> want, I still have to allow http access to 1st URL.
> Is there a way to do it, if yes, how?


Simply force the use of SSL for context /teamacces. That is what
'user-data-constraint', and 'transport-guarantee' of CONFIDENTIAL, are
for, in web.xml. Use that in combination with a web-resource-collection
covering that entire web app (since it appears that you're really
requiring that all of web app 'web-admin' is HTTP, and all of web app
'teamacces' is HTTPS).

This is not Tomcat server.xml kind of stuff. This is Servlet API web.xml
kind of stuff.

AHS
--
I tend to watch a little TV... Court TV, once in a while. Some of the
cases I get interested in.
-- O. J. Simpson

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Fo:Block can you check to see if a block contains any text by using the block id? morrell XML 1 10-10-2006 07:18 PM
How to give selective access to the methods in a class? toton Java 18 08-14-2006 07:26 PM
selective page access yasaswi Java 2 02-04-2005 12:33 PM



Advertisments