-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In zuul 2.x sample demo, a request routing to nginx-backend http service always got 404 error #434
Comments
#Instance env settings region=us-east-1 #Eureka instance registration for this app #Name of the application to be identified by other services #The port where the service will be running and serving requests #Virtual host name by which the clients identifies this service #For eureka clients running in eureka server, it needs to connect to servers in other zones #Don't register locally running instances. #Disable eureka #Loading Filters #Load balancing backends with Eureka eureka.shouldUseDns=true eureka.serviceUrl.default=http://${region}.${eureka.eurekaServer.domainName}:7001/${eureka.eurekaServer.context} #api.ribbon.NIWSServerListClassName=com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList #Load balancing backends without Eureka api.ribbon.listOfServers=http://xx.com:80 ##{nginx-backend hostname}api.ribbon.UseIPAddrForServer=false |
Which host header are you getting on your backend? |
That's not how proxies are supposed to behave. You have to maintain the host header from the original request otherwise your service has no idea where the request came from. |
I think it's better if the proxy overrides the host header to get the host from ribbon.listOfServers? @artgon |
And so? how to fix this problem? |
I have the same problem. @artgon please help to solve this. |
If you want to change the outbound host header, you can add a filter that modifies the inbound request headers. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Condition:
1.disable eureka, and then
2.choose ConfigurationBasedServerList
We found this error was relation to 'Host' header forward to real service. Or i did incorrect configuration(see below bold line)?
The text was updated successfully, but these errors were encountered: