Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im running a Debian 6 LEMP server with multiple virtual hosts and everything has been fine for 5 or so sites. But I've just tried adding another but for some reason it's just not working. By not working I mean in Chrome I get the "Oops! Google Chrome could not connect to" error.

I've changed the domain for security to and the IP is masked.

Hosts file (I have multiple sub domains): * *.example

Server Block:

server {
    listen 80;

    access_log      /srv/www/;
    error_log       /srv/www/;
    root            /srv/www/;

    location / {
        index       index.html index.htm index.php;

    location ~ \.php$ {     
        include         fastcgi_params;
        fastcgi_index   index.php;
        fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;

I've created the system link to the file in the /etc/nginx/sites-enabled/ directory and restarted/reloaded nginx.

DNS seems fine:

# ping -c 2 subdomain
PING ( 56(84) bytes of data.
64 bytes from ( icmp_req=1 ttl=64 time=0.035 ms
64 bytes from ( icmp_req=2 ttl=64 time=0.048 ms

Checking the file with cURL works:

# curl

Emptied browser cache but still no dice.

Anything I'm missing? Like I mentioned, I have a few sites running fine on the server currently so php-fpm etc etc are working. Any help would be much appreciated!



share|improve this question

its kind of hard to help you out there, as you didn't provide enough information... but I'll try it anyway

  • hosts file doesn't support masking so you can't use "*." in your hosts file.
  • that ping that you did it came from where? server or client?
  • for curl use -v to check your host/IP
  • does your chrome have some sort of proxy enabled? that would possible route you somehow different from what you're expecting..
share|improve this answer
hey, thanks for the reply. hmm its odd you mention the hosts file not supporting the *. as I've setup a few sites now using that and they work fine? the ping was from the server but ive traced the domain back to the server using a client also. i'll have a go with the other curl and by hardcoding in the host on Monday though. thanks again for your help, Dave – daveaspinall Apr 13 '12 at 23:29
Sorry forgot to mention, is there any other info that would help shine some light on the situation that you can think of? – daveaspinall Apr 13 '12 at 23:29
up vote 1 down vote accepted

The person who set up the domain for me pointed it to the wrong server IP so that was the issue.

Schoolboy error, sorry to have bothered you all!

On a side note, the * references in the hosts file do actually work.

share|improve this answer
Make sure you come back and set this as your accepted answer :-) – pauska Apr 16 '12 at 11:13

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.