java - Grails app running on two different domains -
i'm trying make grails app run under 2 different domains - test.com/myapp
, test.org/myapp
. host
in config.groovy
url pointing https://test.com/myapp
happens when go test.org/myapp
goes home page , when i'm trying login redirects first domain. guess it's spring security , path generating. options in order fix that?
here myapp.conf
if need additional data pls let me know in comments
alias /.well-known/acme-challenge/ "/var/www/html/certbot/.well-known/acme-challenge/" <directory "/.well-known/acme-challenge/"> options -indexes -multiviews allowoverride none order allow,deny allow </directory> <virtualhost *:80> servername test.com rewriteengine on rewritecond %{https} off rewriterule (.*) https://%{http_host}%{request_uri} [l,r=301] </virtualhost> <virtualhost *:443> servername test.com serveralias www.test.com documentroot /var/www/html/honeypot/ rewriteengine on php_flag engine off removehandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo jkmount /* worker1 jkunmount /myapp/files/* worker1 alias "/myapp/files" "/var/www/myapp/files" <directory "/myapp/files"> allow options -indexes allowoverride none </directory> sslengine on sslcertificatefile /etc/letsencrypt/live/test.com/cert.pem sslcertificatekeyfile /etc/letsencrypt/live/test.com/privkey.pem sslcertificatechainfile /etc/letsencrypt/live/test.com/chain.pem sslproxyengine on proxypreservehost on proxypassmatch ^/myap(.+)$ ! proxypass / https://myserver.com/ proxypassreverse / https://myserver.com/ </virtualhost>
update grails.serverurl = https://test.com/myapp
perhaps should post configuration spring-security. assuming problem, there different ways tackle it. 1 can set external configuration in grails applications using grails.config.locations (see http://docs.grails.org/2.5.4/guide/single.html#configexternalized) , override application settings spring security within external file on server grails.config.locations referencing.
this allows manage application configuration separately, deploy same war. manage external files configuration management system, such puppet.
Comments
Post a Comment