Score:0

"rewrite or internal redirection cycle while internally redirecting to" Nginx

ga flag

rewrite or internal redirection cycle while internally redirecting to "/opt/soa/adminControl/v1/ro42/", client: 127.0.0.1, server: _, request: "GET /opt/soa/adminControl/v1/ro42/ HTTP/1.1", host: "localhost:81"

I have the above error after I did

curl localhost:81/opt/soa/adminControl/v1/ro42/

shouldn't I be getting whatever is inside the index.php file. My php controllers are in /opt/soa/adminControl/v1/ro42/. I have Apache2 listening in 80 as the reverse proxy server serving php endpoints to nginx. Index.php is just

php echo "Hello";

File1:/etc/nginx/nginx.conf

events {
worker_connections 1024;
}

http {
  access_log /var/log/nginx/access.log;
  error_log /var/log/nginx/error.log;

  server {
    listen 81 default_server;
    server_name _;

    location  /opt/soa/adminControl/v1/ro42 {
      try_files $uri $uri$is_args$args;
      include snippets/fastcgi-php.conf;
      fastcgi_pass 127.0.0.1:9000;
    }
  }
}

Fil2: /etc/apache2/sites-enabled/myPage.conf

<VirtualHost *:80>

    ErrorLog ${APACHE_LOG_DIR}/errorVH.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    ServerName 54.172.180.152
    DocumentRoot /var/www/userExperience
    ProxyPass /opt/soa/adminControl/v1/ro42 http://localhost:81
    ProxyPassReverse /opt/soa/adminControl/v1/ro42 http://localhost:81

</VirtualHost>

I think the error is in the way how I'm calling

try_files $uri $uri$is_args$args;

in nginx.conf. I modified the line to: "try_files $uri$is_args$args =404;" and after I curl it. I started getting

404 Not Found
I sit in a Tesla and translated this thread with Ai:

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.