I created a droplet2 to host domain2.com from a snapshot image copied from another droplet1 that hosted domain1.com. domain1.com has wordpress and it works fine, but when I visited domain2.com , it says too many re-direct.
I have modified droplet2 in this way:
in the /etc/nginx/sites-enabled/default I have replaced domain1 with domain2.
in the /etc/nginx/sites-enabled/default I see this line:
sslcertificate /etc/nginx/ssl/domain2/cert.pem; sslcertificatekey /etc/nginx/ssl/domain2/key.pem;
I have a couple of questions:
2a I see two location for the ssl
location1: the first is this
/etc/nginx/ssl/domain2/cert.pem in file
location2: the second is this one in
sslcertificate /etc/ssl/certs/ssl-cert-snakeoil.pem; sslcertificatekey /etc/ssl/private/ssl-cert-snakeoil.key;
my question is which location (location1 or location2) can I find my ssl file?
2b I copied the “Origin Certificates” from cloudflare to both /etc/nginx/ssl/domain2/ and /etc/ssl/ but I still have the “too many redirect messages”
3 I noticed that my cloudflare, under Crypto it is “flexible” ssl. When I changed from “flexible” to “full” it seems working, regardless if I used the ssl files downloaded from cloudflare or not. Even if the “Origin Certificates” from cloudflare do not match the files in location1 or locatin2, it is still working with “full” ssl. How is this possible?
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!