Итак есть vps на ЦентОС 6.5, Апач 2.2.15, nginx 1.6.2 ISPManager 5.x (зло). На сервере крутится wordpress, нужно перевести его на https. Вопрос по сабжу.
Сами конфиги
nginx
#user 'lor' virtual host 'site.ru' configuration file
server {
limit_conn perip 15;
server_name site.ru www.site.ru;
#rewrite ^ https://$server_name$request_uri? permanent;
charset off;
disable_symlinks if_not_owner from=$root_path;
index index.html index.php;
root $root_path;
set $root_path /var/www/lor/data/www/site.ru;
access_log /var/www/httpd-logs/site.ru.access.log ;
error_log /var/www/httpd-logs/site.ru.error.log notice;
include /etc/nginx/vhosts-includes/*.conf;
location / {
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
expires max;
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;
}
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
}
location @fallback {
error_log /dev/null crit;
access_log off ;
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
ssi on;
gzip on;
gzip_comp_level 5;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
listen 12.34.56.78:80;
}
server {
limit_conn perip 15;
server_name site.ru www.site.ru;
#rewrite ^ https://$server_name$request_uri? permanent;
charset off;
disable_symlinks if_not_owner from=$root_path;
index index.html index.php;
root $root_path;
set $root_path /var/www/lor/data/www/site.ru;
access_log /var/www/httpd-logs/site.ru.access.log ;
error_log /var/www/httpd-logs/site.ru.error.log notice;
include /etc/nginx/vhosts-includes/*.conf;
location / {
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
expires max;
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;
}
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
}
location @fallback {
error_log /dev/null crit;
access_log off ;
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
ssi on;
gzip on;
gzip_comp_level 5;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
listen 12.34.56.78:443;
ssl on;
ssl_certificate "/var/www/httpd-cert/lor/www.site.ru.crtca";
ssl_certificate_key "/var/www/httpd-cert/lor/www.site.ru.key";
}
Apache
#user 'lor' virtual host 'site.ru' configuration file
<VirtualHost 127.0.0.1:8080>
ServerName site.ru
AddDefaultCharset off
DocumentRoot /var/www/lor/data/www/site.ru
ServerAdmin info@lor.ru
SuexecUserGroup lor lor
CustomLog /var/www/httpd-logs/site.ru.access.log combined
ErrorLog /var/www/httpd-logs/site.ru.error.log
ScriptAlias /cgi-bin/ /var/www/lor/data/www/site.ru/cgi-bin/
ServerAlias www.site.ru
DirectoryIndex index.html index.php
<FilesMatch "\.ph(p[3-5]?|tml)$">
SetHandler fcgid-script
FCGIWrapper /var/www/php-bin-isp-php56/lor/php
</FilesMatch>
</VirtualHost>
<Directory /var/www/lor/data/www/site.ru>
Options +ExecCGI +Includes
</Directory>
Проблема в том, что как не крути по https не отдаёт статику nginx.