Answer the question
In order to leave comments, you need to log in
How to change REQUEST_SCHEME to https when proxying?
Actually the next problem. There is an nginx Server that accepts various requests for 3 domains over HTTPS and redirects them to 3 local ones, depending on the domain in the request.
respectively, on the servers for sites (site1-site3) in the super global array, there are the following values:
$_SERVER['REQUEST_SCHEME'] = 'http'
$_SERVER['SERVER_PORT'] = '80'
Accordingly, many problems arise because of this. How it is possible to force servers to replace these values?
Using PHP is not an option, because not all sites use a single entry point where you can cheat and replace these values with your hands
Answer the question
In order to leave comments, you need to log in
It turned out, but logically it is not possible to establish an exact connection.
If you specify the server name with the scheme and port in the Apache settings (ServerName https://site1.ru:443), then the array becomes:
$_SERVER['REQUEST_SCHEME'] = 'https'
$_SERVER['SERVER_PORT'] = '443 '
However, the links on the site are built incorrectly and lead to site1.ru , however, if you enable UseCanonicalPhysicalPort On, then the links on the site are treated, but so far it is not possible to understand the logic
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question