• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

DNS confusion in /etc/hosts

rjshelq

New Pleskian
Hi,

I've just moved my web site to a new server running Plesk 8.2 / CentOS 4.5, and have been having problems with dns.

The Problem:

For example, if I log in via ssh and try to use wget to grab a file from my cgi-bin, such as:

wget mydomain.com/cgi-bin/test.pl

the request fails, and according to the error logs the request has ended up going to /var/www/cgi-bin rather than the intended /var/www/vhosts/mydomain.com/cgi-bin.

Similarly, in php4 using curl or fopen to access mydomain.com/cgi-bin/test.pl always fails, and again always ends up at /var/www/cgi-bin.

In all of these cases, using the IP address rather than the domain name works fine. So, it appears that this is a dns resolution issue.

An Observation:

On this new server, the /etc/hosts file says:

127.0.0.1 mydomain.com domain localhost.localdomain localhost

Questions:

1) Why does 127.0.0.1 end up going to /var/www ? Is that by design?

2) Is it reasonable to simply change the /etc/hosts file to read:

127.0.0.1 localhost.localdomain localhost

and allow the dns to resolve mydomain.com? or does some Plesk feature require mydomain.com to resolve to 127.0.0.1?

.... thanks....
 
Your /etc/hosts file should look like this:

127.0.0.1 localhost.localdomain localhost
xxx.xxx.xxx.xxx server1.domain.com server1

Of course, change the x's to your base IP address and server1.domain.com to your server's actual hostname. That should take care of it.
 
Back
Top