0

Recently I have posted regarding "How can I remove the application name from a Grails application’s URL?". The solution for this was

first shutdown your tomcat [from the bin directory (sh shutdown.sh)] then you must delete all the content of your tomcat webapps folder (rm -fr *) then rename your WAR file to ROOT.war finally start your tomcat [from the bin directory (sh startup.sh)].

The problem with the above solution is that tomcat 6 gives me 400 bad request error whenever i access using the domain name (http://myapp.mydomain.com). How to resolve the issue. With IP (http://1.x.x.x) its working fine But the domain name it gives me error like this.

You can refer My old post Here

Community
  • 1
  • 1
n92
  • 7,424
  • 27
  • 93
  • 129

1 Answers1

0

You should configure Tomcat Host: http://tomcat.apache.org/tomcat-6.0-doc/config/host.html

If you have just one application, you can just edit existing value of name attribute.

But if you need to create a new application, and keep existing applications under existing hosts, then you should also setup appBase attribute, pinting to a different directory (it's a directory for your ROOT.war)

Igor Artamonov
  • 35,450
  • 10
  • 82
  • 113
  • I have just added "grails.app.context = '/'" in config.grrovy and deployed war as ROOT.war in webapps. The app can be accessible at http://localhsot:8080. It is not giving any 400 bad request error. My question: Apart from these setting is it mandatory to create ROOT.xml and do the configurations. – n92 Jan 31 '13 at 06:22
  • 1
    No, it's not mandatory. You could use `ROOT.war` *OR* a `.xml` with context config – Igor Artamonov Jan 31 '13 at 09:15