So konfigurieren Sie Let's Verschlüsselung für einen Server mit openvpn

634
ironsand

Ich möchte meine Rails-App SSL zur Verfügung stellen, konnte sie jedoch nicht konfigurieren.

Ich verwende Let's encryptfür SSL und der Server verwendet Nginx. Es gibt auch einen openvpnDienst, der von openvpn-install installiert wird .

Dies ist was ich für die Installation getan habe:

$ sudo service openvpnas stop $ sudo service openvpn stop $ sudo service nginx stop  $sudo ./certbot-auto certonly --standalone -d ganan-finance.com /opt/eff.org/certbot/venv/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6 DeprecationWarning Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator standalone, Installer None Cert not yet due for renewal  You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry. (ref: /etc/letsencrypt/renewal/ganan-finance.com.conf)  What would you like to do? ------------------------------------------------------------------------------- 1: Keep the existing certificate for now 2: Renew & replace the cert (limit ~5 per 7 days) ------------------------------------------------------------------------------- Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2 Renewing an existing certificate /opt/eff.org/certbot/venv/lib/python2.6/site-packages/acme/jose/jwa.py:110: DeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead. signer = key.signer(self.padding, self.hash) Performing the following challenges: tls-sni-01 challenge for ganan-finance.com Waiting for verification... Cleaning up challenges  IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/ganan-finance.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/ganan-finance.com/privkey.pem Your cert will expire on 2018-02-16. To obtain a new or tweaked version of this certificate in the future, simply run certbot-auto again. To non-interactively renew *all* of your certificates, run "certbot-auto renew" - If you like Certbot, please consider supporting our work by:  Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le $ sudo service openvpnas start $ sudo service openvpn start $ sudo service nginx start 

Nginx Konfig

server { listen 80; listen 443 ssl; server_name ganan-finance.com; ssl_certificate /etc/letsencrypt/live/ganan-finance.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/ganan-finance.com/privkey.pem; } 

Und warum kein Vorhängeschloss zeigt diesen Fehler:

SSL verification issue (Possibly mis-matched URL or bad intermediate cert.). Details: ERROR: certificate common name 'tk2-207-13319.vs.sakura.ne.jp' doesn't match requested host name 'ganan-finance.com'.   Certificate valid through: Jun 30 20:40:44 2025 GMT Certificate Issuer:  SSL Protocols Supported: TLSv1 TLSv1.1 TLSv1.2 

Und ich habe openvpn-install verwendet, um zu installieren openvpn.

Ich denke, das Problem wird durch Verwechslung openvpnund Let's encryptKonfiguration verursacht. Aber ich konnte nicht herausfinden, wie ich das Problem lösen könnte.

Was muss ich tun, um das Problem zu beheben?

3
Das Certbot Nginx-Plugin kümmert sich um die Neukonfiguration von Nginx: Siehe [diesen Artikel] (https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on- Ubuntu-14-04). harrymc vor 6 Jahren 0
Die automatische Rekonfiguration von Certbot ersetzt einfach `ssl_certificate` und` ssl_certificate_key`, die bereits mit denselben Werten vorhanden sind. ironsand vor 6 Jahren 0

0 Antworten auf die Frage