I run a Java-Server behind a NGINX proxy. I use a Java Server Socket extansion, but this don´t change the working. I use the proxy because i want to join the server via a domain. If i use the normal ip-adress from my server everything work fine, but if i want to use the domain it gives me errors. I think the problem is the configuration of nginx.
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-NginX-Proxy true;
proxy_redirect off;
this are some settings i tried but it don´t work. I found in different sources these commands.
super("subdomain.domain.de", 80, 5000, false, false, "login", "test");
this is my Constructor for the Client. nginx listens in port 80 and root to 8181.
java.io.StreamCorruptedException: invalid stream header: 48545450
This is the error i got on the client.
Maybe somebody know, how to configure nginx that this work.
What settings do i need and where to store/ add.
Fritz Möhring is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.