Articles in this section

Wrong $_SERVER['HTTP_HOST'] and $_SERVER['SERVER_NAME'] using Default Site in IP Addresses

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • There is a Default Site is configured in Tools & Settings > IP Addresses, it add a misconfiguration in Nginx, adding ServerAlias "default-210_0_113_2" in the configuration and changing $_SERVER['HTTP_HOST'] and $_SERVER['SERVER_NAME'].
  • When accessing an error page using the IP address of configured website, the server returns "default-10_69_43_125" as hostname.
  • Ngnix configuration adds the following value to the domain, changing $_SERVER['HTTP_HOST'] and $_SERVER['SERVER_NAME']:

    PLESK_ERROR: ServerAlias "default-210_0_113_2"

Cause

The issue is caused by a Plesk bug with ID #PPPM-15108 that will be fixed in next releases. You can follow the resolution in Plesk Change Logs.

3rd-line: PPS-18234

Resolution

Until the bug being fixed, use the following workaround:

# plesk bin apache --listen-on-localhost false

 

Was this article helpful?

Comments

2 comments
Date Votes

Please sign in to leave a comment.