• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Redirect or DNS alias?

 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am using apache-tomcat-6 as a web server.
I have a index.jsp, I want to create a DNS alias so when user enter like

http://abc.com
http://abc
http://otheralias
--> it all will direct to http://abc.com

How do I set this up? What do I do in the index.jsp or in the server.xml?
Thank in advance
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can set up host name aliases in your $CATALINA_HOME/conf/server.xml file.

http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Host%20Name%20Aliases
 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you for your link.
I read the links and it is showing to add the new entry into the server.xml in conf/ directory, and also I do have to register the alias into the server registry in order to make it works right?

also , if i want to test if the alias name work on my localmachine, how do I do that. I changed my server.xml to as the following

Usually if i access my local then i type
https://localhost:7070/works --> then I get into the first page index.jsp
so in the same token: I want to type www.mymachine.com ---> it redirect me to http://localhost:7070/works[/B]

Please giving more help or assist.
Thanks

 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone help on this? thanks a bunch
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic