Есть nginx конфиг:
server {
listen 80 default;
root /var/www/....;
index index.php index.html index.htm;
server_name site.com;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS';
add_header 'Access-Control-Max-Age' 1728000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
server {
listen 443 ssl;
root /var/www/....;
index index.php index.html index.htm;
server_name site.com;
##
# SSL
##
ssl_certificate /usr/local/ssl/sert.crt;
ssl_certificate_key /usr/local/ssl/private.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
ssl_prefer_server_ciphers on;
keepalive_timeout 60;
add_header Strict-Transport-Security 'max-age=604800';
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS';
add_header 'Access-Control-Max-Age' 1728000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param HTTPS on;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
При переходе на
http://my.site.com, происходит автоматический редирект на
https://my.site.com, но я такого не настраивал и не кодил. В чем может быть проблема? Или быть может, я ошибся с конфигом?