Help configure nginx for 2 or more HTTPS-enabled hosts. network diagram

Router - принимает запросы по HTTP и HTTPS. Передает их на host A(10.200.1.10) на 80/443 порт HostA (10.200.1.10) - nginx 1.10.3: принимает запросы на 80/443 портах. Обслуживает: www.site.ru (proxy_pass http://10.200.1.11:80) sub.site.ru (proxy_pass http://10.200.1.12:80) HostB (10.200.1.11) - apache2 + WordPress 4.7.2 (www.site.ru) HostC (10.200.1.12) - apache2 + php-script (sub.site.ru) 

There are no problems with sub.site.ru - incoming requests to port 80 nginx translates into https and everything works fine. Problems does wordpress - I get either a redirect-loop in / wp-admin /, or a redirect-loop in /, or the requests will be redirected to https://sub.site.ru .

Here - http://pastebin.com/MWRukUun - the complete config for nginx. This version of the config leads to a redirect-loop.

How can I solve the problem? Is it generally solvable?

  • What about wordpress in admin panel - Settings - General - "WordPress Address (URL)" and "Website Address (URL)"? If the admin panel is permanently unavailable, then what's in the database is the wp_options table, entries with options_name= siteurl and home ? The picture is very similar to the wrong domain change in WP. - KAGG Design
  • @KAGGDesign: yes. I did that. changed http: // to https: // - did not help. only the redirect-loop type changed: either to / or wp-admin - Boris
  • And so it is impossible with WordPress. He has all the internal links absolute, they need to change everything, otherwise the redirect loop. - KAGG Design

0