Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Need some help. With the following configuration on NGINX the browser keeps throwing the error "too many redirects". All the examples I see points to this approach. Thanks in advance.
server {
listen 8080;
listen [::]:8080;
root /home/site/wwwroot;
index index.php index.html index.htm;
server_name www.domain-example.com;
return 301 $scheme://domain-example.com$request_uri;
port_in_redirect off;
Hello @Nuno Vicente
Try to add another server block to handle requests for "domain-example.com" after redirection.
Without this, requests to "domain-example.com" might cause a redirect loop.
server {
listen 8080;
listen [::]:8080;
server_name www.domain-example.com;
return 301 $scheme://domain-example.com$request_uri;
}
server {
listen 8080;
listen [::]:8080;
root /home/site/wwwroot;
index index.php index.html index.htm;
server_name domain-example.com;
}