Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have 2 dedicated servers both running CentOS 5.3/Plesk 10. I've transfered a website (domain) from old server to a new one via Plesk migration manager and the website (domain) shows in the domain list on Plesk, and it's files are in /var/www/vhosts/domain.com/httpdocs/

I tried to open the website like this: http://xx.xx.xx.xx/domain.com where xx.xx.xx.xx is a shared IP that I've assigned to the domain on a new server during transfer and domain.com is website's domain name. Instead of website loading I get a 404. How can I open the website and see if everything is ok? Essentially, what is the path (using IP) to the website until it gets DNS sorted out?

UPDATE: apache error_log file shows:

[Tue Aug 23 11:05:15 2011] [error] [client xx.xx.xx.xx] File does not exist: /var/www/vhosts/default/htdocs/domain.com

This is where the problem exists, I've expected it to follow path like this:


and instead the server apparently tries this:


Note the difference - "htdocs" and "httpdocs", which is the actual folder on the server. I need to know that the website is running ok, otherwise I cannot assign DNS to make it live...

UPDATE2: I am able to access the website if I edit hosts file on my PC with something like that: domain.com

So how come I can't load it like this: ?

share|improve this question
add comment

1 Answer

If you are serving only a single domain from this machine, just use the IP:

If you are using any sort of virtual hosting, such as because you need to serve two or more domains from the same machine, you cannot easily use a web browser to test this.

Instead, you have to speak the HTTP protocol directly to the web server, and look at the HTML it returns. From the command line, say:

$ telnet 80

If there is a web server running on and listening on the default HTTP port (80) you get this back from telnet:

Connected to localhost.
Escape character is '^]'.

Then you say:

GET / HTTP/1.1
Host: mydomain.com

Press Enter twice after the Host line. It should then give you some HTTP headers, followed by the top-level web page for that site.

It is the Host line that tells the web server which domain you want it to return information for. It is required if you give "HTTP/1.1" on the first line. You can instead try this:

GET / HTTP/1.0

Following this with two Enter keypresses will get you the default page, which depends on the virtual host configuration of the server.

share|improve this answer
I followed the procedure, but that still doesn't give me a clue what url I should enter to the browser... –  Caballero Aug 23 '11 at 13:56
Until DNS is working, there is nothing you can type into a browser's address bar to make a web server configured for name-based virtual hosting return the right pages. Name-based virtual hosting requires DNS. Period. The point of the "telnet" test is simply to check that the server is configured to return the right pages when DNS does become available. It doesn't cause anything to happen to avoid the need for DNS. –  Warren Young Aug 23 '11 at 14:20
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.