By gwet
Hi, I just set up SSL with my web app following the instructions provided in the document “https://www.digitalocean.com/community/tutorials/how-to-set-up-shiny-server-on-ubuntu-16-04.” But since doing it, I have been getting the error “ERRTOOMANY_REDIRECTS”. Would my NGINX file be the problem? In case it can help, here is my NGINX file:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name agreestat.net www.agreestat.net;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name agreestat.net www.agreestat.net;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
location / {
proxy_pass http://67.207.84.153:3838;
proxy_redirect http://67.207.84.153:3838/ https://$host/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 20d;
}
}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @gwet
Can you try modifying the port80 server block to:
server {
listen 80;
listen [::]:80;
server_name agreestat.net www.agreestat.net;
return 301 https://$server_name$request_uri;
}
Test the nginx config file for syntax errors:
nginx -t
If all is good, restart and try again.
Let me know how it goes.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.