vmware
php7
nginx
mysql
laravel
挂载目录 /mnt/hgfs/WWW/test/l/public
首先是/usr/local/nginx/conf/vhost 下的test.com.conf
server{ 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,域名指向挂载目录是行不通的吗,还是我配置错了?求大神
婷婷同学_
相关分类