Grails, need to read a text file using the url in order to get an SSL certificate


To order a certificat, tomcat-8.5.9, the publisher sent us a textfile an told us to make it accessable from our url e.g.

How can I do that? Do I need to include it in my GrailsProject or can I put directly on the server?

I think it means what it says on the tin, and all depends on your setup: =

does your site run SSL ? if so what is in front of port 80 ? apache or equivalent webserver then yes as you say you could add the text file to your virtual folder of your app and serve it but obviously that may be serving your port 8080 traffic so you could introduce a rewrite rule in apache to take care of it or you could put the text file in your grails application:

As an example in my url mapping I have a line like this:

"/googleXXXXXXX.html" (view: '/googleVerification')

The contents of the view is simply

google-site-verification: googlea6XXXXX

So do the same

"/theTextFile.txt" (view: '/textFile')

In the root of your grails-app/views/textFile contains: