• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Issue Nginx $_SERVER['HTTP_HOST'] incorrect

JeroenK

New Pleskian
Server operating system version
AlmaLinux 9.6
Plesk version and microupdate number
18.0.72 Update #1
We discovered a weird setting where php's $_SERVER['HTTP_HOST'] is always set to the domain alias's target. Previously, expected and on a copy of the same subscription, its supposed to display the current url.
This is necessary because of Prestashop Multistore.
main url: url.nl
Alias: URL.com (not 301 redirected)
On the index (/) opening .com its displaying the .nl as HTTP_HOST.
host_dump_on_index.png

However, creating a seperate php file to dump the exact same code, its correct:
host_dump_on_not_index.png


I believe it has something to do with the proxy of nginx.
possible_incorrect_settings.png
The copy we have created a month ago does not contain the *_ip_default.conf file.

I have:
fastcgi_param HTTP_HOST $host;
set in 'Additional nginx directives'.

$host does seem to be the correct value:

1756460913205.png

1756461079794.png

Any further info can be given.
 
Back
Top