流浪的nginx vhost服务器名可以';t正在使用中,仅本地主机和127.0.0.1
vhost配置:流浪的nginx vhost服务器名可以';t正在使用中,仅本地主机和127.0.0.1,nginx,vagrant,Nginx,Vagrant,vhost配置: 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$ {
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:好的您是否编辑了主机
hosts
文件?并为local.laravel.test
添加一行?您的答案是work。它让我想起了一些事情。曾经我没有编辑主机,可以通过服务器名称访问。因为本地Intranet已将域与ip绑定。非常感谢。您是否编辑了主机hosts
文件?并为local.laravel.test
添加一行?您的答案是work。它让我想起了一些事情。曾经我没有编辑主机,可以通过服务器名称访问。因为本地Intranet已将域与ip绑定。非常感谢。