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 (обсуждение | вклад) Нет описания правки |
||
| Строка 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; | |||
server_name wiki; #nginx 0.8.10 default < default_server | |||
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:49, 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;
server_name wiki; #nginx 0.8.10 default < default_server
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;
}