I have a Grails 4.0.10 app that I am trying to run on port 443 because when using other port than 443 the port number is displayed in the url bar like this.
https://2.113.139.14:8443/
I can make it run on any other port like 8443 or 8445.
I just changed the port to 8445.
I made the changes here, in application.yml:
server:
port: 8445 # The port to listen on
ssl:
enabled: true # Activate HTTPS mode on the server port
key-store: /home/runner/selfsigned.jks # e.g. /etc/tomcat7/keystore/tomcat.keystore
key-store-password: pepsicola # e.g. changeit
key-alias: tomcat # e.g. tomcat
key-password: pepsicola
In application.groovy
grails.plugin.springsecurity.portMapper.httpPort=8080
grails.plugin.springsecurity.portMapper.httpsPort=8445
production {
grails.logging.jul.usebridge = false
net.authorize.environment = net.authorize.Environment.PRODUCTION
net.authorize.formAction = net.authorize.Environment.PRODUCTION.baseUrl.toString() + '/gateway/transact.dll'
grails.insecureServerURL = "http://2.113.139.14:${grails.plugin.springsecurity.portMapper.httpPort}${grails.app.context}"
grails.serverURL = "https://2.113.139.14:${grails.plugin.springsecurity.portMapper.httpsPort}${grails.app.context}"
In build.gradle
bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-Duser.timezone=US/Mountain',
'-Dgrails.server.port.https=8445',
'-Dgrails.server.port.http=8080',
// '-Dorg.apache.catalina.session.StandardSession.ACTIVITY_CHECK=true',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
But when I make the changes like this to 443, it doesn't work.
In application.yml
server:
servlet:
context-path: '/roadrace'
port: 443 # The port to listen on
ssl:
enabled: true # Activate HTTPS mode on the server port
key-store: /home/runnercard/selfsigned.jks # e.g. /etc/tomcat7/keystore/tomcat.keystore
key-store-password: pepsicola # e.g. changeit
key-alias: tomcat # e.g. tomcat
key-password: pepsicola
In application.groovy
grails.plugin.springsecurity.portMapper.httpPort=8080
grails.plugin.springsecurity.portMapper.httpsPort=443
production {
grails.logging.jul.usebridge = false
net.authorize.environment = net.authorize.Environment.PRODUCTION
net.authorize.formAction = net.authorize.Environment.PRODUCTION.baseUrl.toString() + '/gateway/transact.dll'
grails.insecureServerURL = "http://2.113.139.14:${grails.plugin.springsecurity.portMapper.httpPort}${grails.app.context}"
grails.serverURL = "https://2.113.139.14:${grails.plugin.springsecurity.portMapper.httpsPort}${grails.app.context}"
In build.gradle
bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-Duser.timezone=US/Mountain',
'-Dgrails.server.port.https=443',
'-Dgrails.server.port.http=8080',
// '-Dorg.apache.catalina.session.StandardSession.ACTIVITY_CHECK=true',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
In the server I am running the app as stand-alone Java using the command
java -Xmx6g -Dgrails.env=prod -Duser.timezone=US/Mountain -jar /home/runnercard/RCRoadRaceWeb4.jar
What can I try next?