Mixed IP and Name Based Virtual Hosts with nginx

Posted by nerkn on Server Fault See other posts from Server Fault or by nerkn
Published on 2010-10-26T20:08:58Z Indexed on 2011/01/15 9:55 UTC
Read the original article Hit count: 172

Filed under:
|
|

I set up many domains but I dont know how to configure if only ip address is given.

say foo.com I have a setup to go web/foo.com/htdocs, I want to 88.99.66.55 ip address like a domain to web/fook.com/htdocs

server {
    listen       80;
    server_name  85.99.66.55;
    location / {
            root  /home/web/fook.com/htdocs;
    }
 location ~ \.(php|php3|php4|php5)$ {
                root          /home/web/fook.com/htdocs;
                include       fastcgi_params;
                fastcgi_pass  127.0.0.1:9000;
        }
    }

resulted

  [warn]: conflicting server name "85.105.65.219" on 0.0.0.0:80, ignored

© Server Fault or respective owner

Related posts about php

Related posts about nginx