Score:0

Nginx reverse proxy with Tomcat without showing the in 8080 in IP

ar flag

I have sucessfully proxy passed tomcat 1XX.XXX.XXX.XXX:8080 to 1XX.XXX.XXX.XXX through NGINX . Both 1XX.XXX.XXX.XXX:8080 and 1XX.XXX.XXX.XXX has and shows same thing.

server{ listen 80;
server_name 1XX.XXX.XXX.XXX
location  \{
    proxy_pass http://localhost:8080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

But what i want is to show content through reverse proxy only i.e 1XX.XXX.XXX.XXX , if i enter 1XX.XXX.XXX.XXX:8080 i want to display error page or redirect back to 1XX.XXX.XXX.XXX . How do i do it ? Thanks in advance :) .

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.