When Nginx is enabled, IP-based virtual hosts (default domains on an IP) do not work properly if more than one IP has a default domain assigned.
A domain is shown instead of Plesk default server page.
When Nginx makes an IP-based proxy request, it connects to Apache on the address
127.0.0.1 and sends the request. This means that from Apache's point of view, all virtual hosts are on the same IP address –
127.0.0.1 – which causes IP-based virtual hosts to work improperly.
That is, the first virtual host defined in the
/usr/local/psa/admin/conf/ip_vhosts_bootstrap.conf file becomes the default on all IP addresses, including those which do not have a default domain assigned.
This is a software issue with internal ID #PPPM-269. The issue will be fixed in a future update for which a new Knowledgebase article will be created. You may subscribe to new articles on Plesk products if you wish to receive notifications about their creation.
As a workaround, you may use following instructions.
Go to the
# cd /usr/local/psa/admin/conf/templates
Create a sub-directory called
# mkdir custom
/usr/local/psa/admin/conf/templates/default/nginx.phpfile to the
# cp default/nginx.php custom/
nginx.phpfile by replacing 127.0.0.1 with $host or $server_addr
# vi custom/nginx.php
You should get the following as a result:
proxy_pass http://$server_addr:<?php echo $VAR->server->webserver->httpPort ?>;
Rebuild the web-server configuration: