LinuxForum.Fans
Тема

nginx и ssl

Автор: post 2 сообщений 1887 просмотров
#294071

Здраствуйте. Почему то не заходит по https хотя уже перепробывал много инструкций как настроить это всё.
конфиг настройки домена:

text

server {

listen 443 ssl; listen 80; server_name www.example.com example.com; #charset koi8-r;

ssl_certificate /etc/nginx/ssl/cert.pem; ssl_certificate_key /etc/nginx/ssl/cert.key; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m;

access_log /var/log/nginx/example.com.access.log main; error_log /var/log/nginx/example.com.log error;

location / { root /var/www/example.com/www; index index.php index.html index.htm; }

location = /favicon.ico { log_not_found off; access_log off; }

error_page 404 /index.html; #location = /404.html { # root /usr/share/nginx/html; #}

# redirect server error pages to the static page /50x.html # #error_page 500 502 503 504 /50x.html; #location = /50x.html { # root /usr/share/nginx/html; #}

#location ~* .(js|css|png|jpg|jpeg|gif|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ {

# add_header Pragma "public"; # add_header Cache-Control "public, must-revalidate, proxy-revalidate"; # access_log off; # log_not_found off; # expires 360d; #}

location ~ /.ht { deny all; access_log off; log_not_found off; }

location ~ \.php$ { #rewrite ^/(.*)/$ /$1 permanent; #fastcgi_split_path_info ^(.+.php)(.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_pass 127.0.0.1:9000; include fastcgi_params; }

# location / { # index index.php; # try_files $uri /index.php?$args; #}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #}

# deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} }

ошибок в логах нет, но по https не заходит
Заранее спасибо за помощь

#298190

попробуйте так
listen 80 default_server;
listen 443 default_server ssl;
server_name site.ru;

ssl_certificate "/etc/nginx/ssl/ssl.pem";
ssl_certificate_key "/etc/nginx/ssl/ssl.key";
ssl_session_timeout 5m;
ssl_session_cache shared:pobedassl:10m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;

Войдите или зарегистрируйтесь, чтобы ответить.