User name: manuth
TITLE
[nginx] localhost can't be resolved
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk Obsidian v18.0.25_build1800200325.19 os_Ubuntu 18.04, Ubuntu 18.04.4 LTS, x86_64
PROBLEM DESCRIPTION
STEPS TO REPRODUCE
Create a fresh Ubuntu 18.04.4 installation
Install plesk using the One Click Setup
Create a docker-container which publishes a port.
Create a (sub-)domain with 301-redirection to https
In the nginx & Apache options disable proxy mode
Add a piece of code like this here:
Try to access the website with said
ACTUAL RESULT
An error is reported:
After applying the fix mentioned in this thread: Websites show 502 Bad Gateway: no resolver defined to resolve example.com
Another error is reported instead:
EXPECTED RESULT
The requests should be passed to localhost without an error.
ANY ADDITIONAL INFORMATION
A possible workaround is to use
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug
TITLE
[nginx] localhost can't be resolved
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk Obsidian v18.0.25_build1800200325.19 os_Ubuntu 18.04, Ubuntu 18.04.4 LTS, x86_64
PROBLEM DESCRIPTION
proxy_pass
-directives to localhost
won't work.STEPS TO REPRODUCE
Create a fresh Ubuntu 18.04.4 installation
Install plesk using the One Click Setup
Create a docker-container which publishes a port.
Create a (sub-)domain with 301-redirection to https
In the nginx & Apache options disable proxy mode
Add a piece of code like this here:
NGINX:
location / {
proxy_pass http://localhost:8080;
}
Try to access the website with said
nginx
-config.ACTUAL RESULT
An error is reported:
Code:
3777#0: *622 no resolver defined to resolve localhost
After applying the fix mentioned in this thread: Websites show 502 Bad Gateway: no resolver defined to resolve example.com
Another error is reported instead:
Code:
7707#0: *627 localhost could not be resolved (3: Host not found)
EXPECTED RESULT
The requests should be passed to localhost without an error.
ANY ADDITIONAL INFORMATION
A possible workaround is to use
127.0.0.1
instead of localhost
. But after trying this I found another very weird misbehavior of plesk's nginx which is covered in a separate thread.YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug
Last edited: