While checking the GCP error log i got a issue (rewrite or internal redirection cycle).
I cannot figure out why this error is happening: "146039 rewrite or internal redirection cycle while internally redirecting to "/static/js/main.64520b4a.js" in nginx.conf
Below is my Config file:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
server_tokens off;
location / {
if (-f $document_root/$maintenance_mode) {
rewrite ^(.*)$ /maintenance_page.html break;
}
try_files $uri /index.html =404;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Request-URI $request_uri;
}
location ~ .(static)/(js|css|media)/(.+)$ {
try_files $uri $uri/ /$1/$2/$3;
}
}
guys if you know the solution, kindly share