Easily configure a performant, secure, and stable NGINX server.Learn More
which of the two files is for ssl and how does it work with cloudflare
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?
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.×