Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi!
I’m completely new to Nginx and followed DigitalOcean’s tutorial on how to set it up with LetsEncrypt! I must have done something wrong though because I am getting a ERR_TOO_MANY_REDIRECTS message when navigating to the site.
Not sure if it makes a difference, but the redirect is for a subdomain (strapi.mysite.com). There is no config for the root domain mysite.com yet.
I have the following config in /etc/nginx/sites-available/mysite.com:
server {
# Listen HTTP
server_name strapi.mysite.com;
location / {
proxy_pass http://strapi;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass_request_headers on;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/strapi.mysite.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/strapi.mysite.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = strapi.mysite.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name strapi.mysite.com;
return 404; # managed by Certbot
}
I’m not quite sure what I did wrong here. I do not see an obvious loop, but perhaps it’s my inexperience with Nginx. Any ideas?
ebeecroft
68aa2215160846bca0a00f952c5fdc
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e