conflicting server name "" on, ignored

sajt nginx-forum at
Thu Sep 29 10:18:51 UTC 2011


I have an Ubuntu for drupal development with 2+1 local domain. I putted
2 domain name to my hosts file, I have the default and two similar
configuration files in my sites-enabled folder:

server {
  if ($request_method !~ ^(GET|HEAD|POST)$ ) {
    return 444;

  root /home/sajt/Projectek/eupharma/htdocs;
  index index.php
  server_name eupharmaltd;
  location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to index.html
    try_files $uri $uri/ /index.html;
  location ~ .php$ {
    fastcgi_pass;  # By all means use a different
server for the fcgi processes if you need to
    fastcgi_index  index.php;

    #fastcgi_param  SCRIPT_FILENAME 
/path/to/drupal$fastcgi_script_name;   # !! <--- Another path reference
for you.
    include /etc/nginx/fastcgi_params;
 if (!-e $request_filename) {
    rewrite ^/(.*)$ /index.php?q=$1 last;

The difference is only the root and the server_name. I get the following

Restarting nginx: [warn]: conflicting server name "" on,

And when I try to access the all domain is showing the same page. The
default is working fine.

Thanks for answers


Posted at Nginx Forum:,216017,216017#msg-216017

More information about the nginx mailing list