• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling http://sitename:8080

 
Prateek Gupta
Greenhorn
Posts: 17
Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have deployed a site using Tomcat 5. However, one problem im facing is that when i type the URL http://sitename:8080 from a remote machine, then the default Apache page gets opened.. How can I disable this??? Kindly help...
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the web app set up in the TOMCAT_HOME/webapps/ROOT directory. If you don't want it, remove its contents, or -if you always want people to access the web app you've deployed- make the default page do a redirect to your web app.
 
Prateek Gupta
Greenhorn
Posts: 17
Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply
However, Using both these methods, I will not be able to see the tomcat homepage anywhere.
My requirement is that the page should not be visible to any remote computer, however at the same time, it should be visible to me as I need it for uploading web apps using Tomcat Manager.
Is there a way by which I can allow only certain IPs to view this page???
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ROOT web app has nothing to do with the manager web app. You can alter the former to your heart's content, and still be able to use the latter.
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also add a <Host.....> section in "TOMCAT_HOME/conf/server.xml"

with the above Host config, you'll only be able to access the contents located in "TOMCAT_HOME/www/sitename.com" if it is called with "sitename.com" or "www.sitename.com" - localhost or 127.0.0.1 will still be the webapps folder.

If you then put a ROOT folder in "TOMCAT_HOME/www/sitename.com" then you can call the webpage without a context path

e.g.
sitename.com:8080 = www/sitename.com/ROOT
sitename.com:8080/test = www/sitename.com/test

localhost:8080 = webapps/ROOT
localhost:8080/test = webapps/test

The port # is the same on both hosts, because it is the same Server config (default port 8080)
 
vinoth Robert
Ranch Hand
Posts: 31
Firefox Browser MS IE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i created a host in server.xml as you said.

its working when i call "http://mysite.com/ " in my local system. But its not working in LAN.

What to do to work in LAN?



 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vinoth Robert wrote:hi

i created a host in server.xml as you said.

i have created the dir "www" then i placed the mysite.com.war file in www.
mysite.com dir is created automatically.

then i created Root dir in "mysite.com".

but its not working when i call "http://mysite.com/ ".

is it correct? if wrong how to call it in browser?



When you use a WAR file like mysite.com.war, then the name of the application will be mysite.com - this means that it should be called like this: http://sitename/mysite.com

What I wrote is that you put a ROOT (in uppercase) folder in (depending on what you've written in Host->appBase) www/sitename.com, and this ROOT folder will act as your web application available at /.

The only thing you do with this configuration is to mirror the default webapps folder, where you also have a ROOT folder available at /, and then can install additional web application next to the ROOT folder.
 
vinoth Robert
Ranch Hand
Posts: 31
Firefox Browser MS IE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ya I got it and its working when i call "http://mysite.com/ " in my local system. But its not working in LAN.



What to do to work in LAN?
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vinoth Robert wrote:

ya I got it and its working when i call "http://mysite.com/ " in my local system. But its not working in LAN.



What to do to work in LAN?

How do you call your server from another machine ??

Is there a local firewall that blocks port 80 on you server ??
 
vinoth Robert
Ranch Hand
Posts: 31
Firefox Browser MS IE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works fine when call my ip in LAN
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic