【发布时间】:2017-12-29 21:32:35
【问题描述】:
这是我现有项目的 nginx config 文件。我可以访问 sms.dev/index.php 。
现在,我想在/var/www/html/laravel 文件夹上部署一个新的laravel 项目,并使用sms.dev/laravel 之类的域来访问我的新laravel 项目。
如何做到这一点?
server{
listen 80;
server_name sms.dev;
index index.php index.html index.htm;
root /var/www/html/sms;
location /laravel/ {
# how to config it ?
}
location ~ .*\.(php|php5)?$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
if (!-e $request_filename) {
return 404;
}
}
【问题讨论】:
-
无论我访问什么浏览器都会返回 404。