Score:0

nginx rewrite configuration not works

us flag

I'm using the latest version of Nginx. I deployed the Nginx pod in k8s and using configMap for my configuration file. I'm trying to rewrite the url and its look like the rewrite is not working at all. When I'm doing the rewrite manually from the browser I'm able to reach the target as expected. When I'm using the stand alone nginx server as a regular service, the configuration is working.

Thanks!

This is configuration:

server {
  listen                  80;
  server_name             nginx-eks.domain.com;
  set $elb internal-LB-INT-domain.us-west-1.elb.amazonaws.com;
  #root                    /usr/share/nginx/html;


  location ~* ^/(so|soplatform) {
  set $build_num 100000548;
  rewrite (?i)^/so/(.*) /so$build_num/$1 break;
  rewrite (?i)^/soplatform/(.*) /soplatform$build_num/$1 break;
  proxy_pass http://$elb:8080;
  proxy_http_version 1.1;
  proxy_set_header Connection "";
  proxy_connect_timeout 60;
  proxy_send_timeout 60;
  proxy_read_timeout 60;
  send_timeout 60;
  }
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.