vagrant nginx vhost servername无法使用,只有localhost和127.0.0.1

时间:2017-03-10 07:38:38

标签: nginx vagrant

vhost config:

server {
    listen   80;

    root /home/vagrant/www/public;
    index index.php index.html index.htm;

    server_name local.laravel.test;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    }
}

local.laravel.test:5000:无法找到服务器DNS地址。

127.0.0.1:5000:ok

0 个答案:

没有答案