Nginx SSL: различия между версиями
Внешний вид
Glorin (обсуждение | вклад) Новая страница: «openssl genrsa 2048 > host.key openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert ...[enter *.domain.com for the Common Name]... openssl …» |
Glorin (обсуждение | вклад) Нет описания правки |
||
| (не показаны 3 промежуточные версии этого же участника) | |||
| Строка 1: | Строка 1: | ||
openssl genrsa 2048 > host.key | openssl genrsa 2048 > host.key | ||
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert | openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert | ||
...[enter *.domain.com for the Common Name]... | ...[enter *.domain.com for the Common Name]... | ||
openssl x509 -noout -fingerprint -text < host.cert > host.info | openssl x509 -noout -fingerprint -text < host.cert > host.info | ||
cat host.cert host.key > host.pem | cat host.cert host.key > host.pem | ||
Nginx config | |||
server { | |||
listen 443; # for nginx <= 0.8.21 default for >= default_server | |||
server_name wiki; | |||
ssl on; | |||
ssl_certificate /etc/ssl/private/wiki.cer; | |||
ssl_certificate_key /etc/ssl/private/wiki.key; | |||
ssl_session_timeout 5m; | |||
ssl_protocols SSLv3 TLSv1; | |||
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; | |||
ssl_prefer_server_ciphers on; | |||
access_log /var/log/nginx/wiki.ssl.access_log; | |||
error_log /var/log/nginx/wiki.ssl.error_log; | |||
root /var/www/wiki/htdocs; | |||
location / { | |||
allow all; | |||
} | |||
autoindex off; | |||
} | |||
Текущая версия от 00:51, 28 апреля 2012
openssl genrsa 2048 > host.key openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert ...[enter *.domain.com for the Common Name]... openssl x509 -noout -fingerprint -text < host.cert > host.info cat host.cert host.key > host.pem
Nginx config
server {
listen 443; # for nginx <= 0.8.21 default for >= default_server
server_name wiki;
ssl on;
ssl_certificate /etc/ssl/private/wiki.cer;
ssl_certificate_key /etc/ssl/private/wiki.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/wiki.ssl.access_log;
error_log /var/log/nginx/wiki.ssl.error_log;
root /var/www/wiki/htdocs;
location / {
allow all;
}
autoindex off;
}