How to remove app name and port from url in grails?

后端 未结 3 1958
名媛妹妹
名媛妹妹 2020-12-15 19:49

Instead of deploying my app to

http://localhost:8080/myApp

I want to deploy it to

http://localhost
相关标签:
3条回答
  • 2020-12-15 20:13

    To change the run-app port, edit grails-app/conf/BuildConfig.groovy and add the line

    grails.server.port.http = 80
    

    To remove the context (the 'myApp' part) edit application.properties and add the line

    app.context=/
    
    0 讨论(0)
  • 2020-12-15 20:13

    To remove the port, use:

    grails -Dserver.port=80 run-app
    
    0 讨论(0)
  • 2020-12-15 20:21

    deploy your app to a tomcat server with the war name as ROOT.war. Because war names describe contexts... papa.war will be available through [root_domain]/papa

    0 讨论(0)
提交回复
热议问题