Добрый вечер
*** CentOS 6.6 *** *** Apache 2.2.29 *** *** Nginx 1.7.5 ***
Без SSL сайты нормально отдаются Nginx-ом
Далее имею самоподписной сертификат.
Виртуальный хост Apache:
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/httpd/conf.d/server.crt
SSLCertificateKeyFile /etc/httpd/conf.d/server.key
ServerAdmin username@test.ru
ServerName site2.test.ru
ServerAlias http://www.site2.test.ru
DocumentRoot /home/httpdocs/site2
ErrorLog /home/httpdocs/logs/default-ssl-error.log
CustomLog /home/httpdocs/logs/default-ssl-access.log common
</VirtualHost>
Конфигурационный файл Nginx:
user nginx;
error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;
worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'«$request» $body_bytes_sent «$http_referer» '
'«$http_user_agent» «http_x_forwarded_for»';
sendfile on;
client_max_body_size 24M;
server_tokens off;
keepalive_timeout 65;
server {
listen 80 default;
server_name localhost;
deny all;
}
gzip on;
gzip_min_length 1100;
gzip_proxied any;
gzip_disable «msie6»;
gzip_buffers 4 8k;
gzip_comp_level 5;
gzip_types text/plain text/xml application/xml application/x-javascript text/javascript text/css text/json;
include /etc/nginx/conf.d/*.conf;
}
Виртуальный хост Nginx:
server {
listen 80;
server_name site2.test.ru http://www.site2.test.ru;
ssl on;
ssl_certificate /etc/httpd/conf.d/server.crt;
ssl_certificate_key /etc/httpd/conf.d/server.key;
#ssl_session_timeout 5m;
#ssl_protocols SSLv2 SSLv3 TLSv1;
#ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers on;
access_log /var/log/nginx/site2.test.ru_access.log main;
location ~* \.(jpg|jpeg|gif|png|ico|css|bmp|swf|js|doc|docx|pdf|xls|xlsx|rar|zip|tbz|7z|exe)$ {
root /home/httpdocs/site2/;
access_log off;
expires 30d;
}
location ~ /\.ht {
deny all;
}
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
log_not_found off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Connection close;
proxy_pass_header Content-Type;
proxy_pass_header Content-Disposition;
proxy_pass_header Content-Length;
proxy_connect_timeout 60;
proxy_send_timeout 90;
proxy_read_timeout 90;
}
}
При запросе https://site2.test.ru отдается Аpache-ем.
Подскажите пожалуйста, что не так делаю?
Спасибо.
