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....
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....