Nginx开发机器设置

时间:2014-04-18 17:06:22

标签: nginx

我正在尝试使用nginx设置我的Windows开发机器,我希望能够运行多个站点。我尝试做的是为nginx.conf中的每个域分配不同的IP地址,并托管文件,如下所示:

nginx.conf

worker_processes  1;

events {
    worker_connections  1024;
}

http {

    gzip on;
    server_tokens off;
    add_header X-Frame-Options Deny;
    expires 365d;

    include       mime.types;

    server {
        listen 172.76.0.10:80;
        server_name  mywebsite.local;
        root   /Websites/mywebsite_dev;

        location / {
            index  index.php;
        }       

        location ~ \.php {  
                include fastcgi.conf;       
                fastcgi_pass    127.0.0.1:9000; 
        }  
    }

    server {
        listen 172.76.0.11:80;
        server_name  mywebsite-two.local;
        root   /Websites/mywebsite-two_dev;

        location / {
            index  index.php;
        }       

        location ~ \.php {  
                include fastcgi.conf;       
                fastcgi_pass    127.0.0.1:9000; 
        }  
    }
}

主机

172.76.0.10    mywebsite.local
172.76.0.11    mywebsite-two.local

但是当我尝试运行nginx服务时,我收到了这个错误:

nginx: [emerg] bind() to 172.76.0.10:80 failed (10049: FormatMessage() error:(15100))

任何人都知道我做错了什么?

0 个答案:

没有答案