0

Using this tutorial http://rainbow-six3.com/plesknginx/ i am trying to redirect my name.com to ip:8080 , after that setup if i acces through name.con i get an redirection loop... is there any other service to redirect? Had a lot of problems with nginx.

I want to redirect name.com to an tomcat7 application wich uses ip:8080 to get executed. Tomcat is already an headache...

Neither this helped me:

Tomcat base URL redirection It outputs webpage not available on link: http://name.com/index.jsp

Community
  • 1
  • 1
Alpha2k
  • 2,212
  • 7
  • 38
  • 65

1 Answers1

1

Mind the words. 'Redirecting' != 'Proying'. You redirect through 301 or 302 to a publicly directly accessible resource, while you proxy to a backend, not supposed to be directly accessed.

The minimal configuration to proxy any name.com/<whatever> request to <ip>:8080/<whatever> is:

server {
    listen 80;
    server_name name.com;

    location / {
        proxy_pass $scheme://<ip>:8080;
    }
}
Bernard Rosset
  • 4,523
  • 6
  • 27
  • 29