Created
July 28, 2014 08:42
-
-
Save lihonosov/b03074ff2501b143b91a to your computer and use it in GitHub Desktop.
Дружим nginx + ssl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| touch /etc/nginx/ssl.conf | |
| # Подключение самоподписанного сертификата | |
| # генерация сертификата: | |
| # openssl req -new -x509 -days 9999 -nodes -out cert.pem -keyout cert.key | |
| ssl on; | |
| ssl_protocols SSLv3 TLSv1; | |
| ssl_certificate /etc/nginx/ssl/cert.pem; | |
| ssl_certificate_key /etc/nginx/ssl/cert.key; | |
| mkdir /etc/nginx/ssl | |
| chown www-data:www-data /etc/nginx/ssl | |
| chmod 700 /etc/nginx/ssl | |
| cd /etc/nginx/ssl | |
| openssl req -new -x509 -days 9999 -nodes -out cert.pem -keyout cert.key | |
| listen 443; # порт https | |
| include /etc/nginx/ssl.conf; # подключение конфигурации ssl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment