Spring Security is redirecting to localhost on production server

前端 未结 4 1289
庸人自扰
庸人自扰 2021-01-18 15:45

I have a grails application with the spring-security-core plugin installed. Everything works fine locally. I deployed to a staging server and everything worked fine. I de

4条回答
  •  旧巷少年郎
    2021-01-18 15:46

    If your application server is behind a web server, this problem is likely caused by your web server configuration. I had this same problem and corrected it by using the following entry in my httpd.conf or apache2.conf. Here it is...

    ...boilerplate configuration here...

    ################################
    # Begin yourdomain.com...      #
    ################################
    
    ProxyRequests Off
    ProxyPreserveHost On
    
    
        Order deny,allow
        Allow from all
    
    
    ProxyPass / http://localhost:28080/
    ProxyPassReverse / http://localhost:28080/
    
    
        Order allow,deny
        Allow from all
    
    
    ################################
    # ... end yourdomain.com       #
    ################################
    

提交回复
热议问题