環境:vmwarephp7nginxmysqllaravel掛載目錄 /mnt/hgfs/WWW/test/l/public首先是/usr/local/nginx/conf/vhost 下的test.com.confserver{ listen 80; #listen [::]:80;
server_name test.com test2.com; index index.html index.htm index.php default.html default.htm default.php; root /mnt/hgfs/WWW/test/l/public; include rewrite/laravel.conf; #error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php-pathinfo.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{ expires 30d;
} location ~ .*\.(js|css)?$
{ expires 12h;
} location ~ /.well-known { allow all;
} location ~ /\. { deny all;
} access_log off;
}接下來是windows的host文件192.168.0.16 test.com問題:此時使用游覽器訪問test.com出現了404,域名指向掛載目錄是行不通的嗎,還是我配置錯了?求大神
虛擬機域名指向共享文件夾404的問題
LEATH
2018-08-10 15:12:04