Answer the question
In order to leave comments, you need to log in
How to transparently make a separate Service for a site in a subpack, but on a different hosting?
Good afternoon
There is: site on Wordpress example.com (Hosted1) -- debian7 + nginx + php5-fpm.
What you need: create a separate Service example.com/service/ , but on a different hosting (Hosting2), because. on the first one, both power and space will not be enough. The easiest way, of course, is to create a subdomain, but you need it as a folder.
Question: how to transparently configure nginx on both hostings so that the Service is "like native" for the main site?
What was tried: on Hosting1 configured proxy_pass on Hosting2 for location /service; . Everything works, the link example.com/service/ shows the Service. But as soon as you start clicking on the links of the Service, you find yourself on the website of the Service192.168.10.2 , and accordingly all links are already internal 192.168.10.2/foo/bar , but you need example.com/service/foo/bar
Give me a direction where to dig.
Answer the question
In order to leave comments, you need to log in
А что мешает сделать в nginx обычный proxy_pass ( nginx.org/ru/docs/http/ngx_http_proxy_module.html#... ) для location /service на второй сервер?
А на втором сервере уже обычная конфигурация Nginx Если надо можно закрыть все остальные location и отдавать с него только /service.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question