Здравствуйте!
Дайте подсказку по ситуации после удаления ssl сертификата и отключения https некоторый контент на сайте идет по https протоколу который в конфиге отсутствует, возможно редиректы или не привильно отдается контент в этой связке. Двиг сайта с кэшами все ок, работают корректно, но в настроке конфига непонятно откуда редиректит на https. С секцией на phpmyadmin вопросов нет, она работает корректно. Непонятно в какую сторону копать, настройку сервера касаемо самого сайта. Почему процессы php-fpm обрабатывает apache а не nginx тоже не понятно.
Текуший конфиг nginx
user nginx;
worker_processes 2;
worker_rlimit_nofile 2768;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
#worker_connections 1024;
worker_connections 3192;
multi_accept on;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
#add 10.02.2017
# ssl_session_cache shared:SSL:2m;
# ssl_session_timeout 2m;
gzip on;
gzip_static on;
gzip_comp_level 7;
gzip_min_length 1024;
gzip_buffers 64 8k;
gzip_http_version 1.1;
gzip_proxied any;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml image/jpeg image/png image/gif;
gzip_disable msie6;
#limit_conn_zone $binary_remote_addr zone=api:10m;
limit_req_zone $binary_remote_addr zone=api:10m rate=50r/m;
client_max_body_size 24M;
client_body_buffer_size 128k;
fastcgi_connect_timeout 60;
fastcgi_param HTTPS off;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
#fastcgi_busy_buffers_size 26k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
####dennis added section
open_file_cache max=10000 inactive=30s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"' "$request_body";
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush off;
tcp_nodelay on;
keepalive_timeout 5;
types_hash_max_size 2048;
#include $no_cache
## Microcache zone definition for FastCGI.
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
конфиг сайта из /etc/nginx/conf.d/
server {
listen 80;
server_name site.ru www.site.ru;
root /home/sites/site.ru;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
index index.php index.html;
location ~* \.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
root /home/sites/site.ru;
access_log off;
expires 1m;
add_header Cache-Control no-cache;
}
location /phpmyadmin {
alias /usr/share/phpMyAdmin;
index index.php;
error_log /var/log/nginx/phpmyadmin.error.log;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
alias /usr/share/phpMyAdmin/$1;
#error_page 404 @apache;
}
location ~ ^/phpmyadmin/(.+\.php)$ {
alias /usr/share/phpMyAdmin/$1;
index index.php;
proxy_pass http://127.0.0.1:888;
proxy_redirect http://127.0.0.1:888 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
error_page 502 = @apache;
error_page 404 = @apache;
#allow 18.251.232.1;
allow all;
#deny all;
}
location @apache {
error_log /dev/null crit;
proxy_pass http://127.0.0.1:888;
# proxy_redirect http://127.0.0.1:888 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
# URLs to attempt, including pretty ones.
try_files $uri $uri/ /index.php?$query_string;
}
# Remove trailing slash to please routing system.
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
# PHP FPM configuration.
location ~* \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param HTTPS off;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# We don't need .ht files with nginx.
location ~ /\.ht {
deny all;
}
}
nginx , php-fpm
olegww ( 28.02.17 02:01:52 MSK )