【发布时间】:2015-10-31 11:03:28
【问题描述】:
我最近刚刚按照本指南在我的 Lamp 服务器上“安装”了 laravel:https://www.digitalocean.com/community/tutorials/how-to-install-laravel-with-an-nginx-web-server-on-ubuntu-14-04
现在当我完成时,它会在他们的指南底部显示
“你现在已经完全安装好 Laravel 并准备好了。你可以 通过访问您的服务器的域或 IP 查看默认登录页面 您的网络浏览器中的地址:
当我访问我的网站时,没有新的登录页面,并且 var/www/html 中没有新文件可以作为登录页面,除了标准的 apache 文件。
对我来说这很好,但我仍然不知道如何创建我的第一个项目,我想这样做以检查我的安装是否完成并且我准备好睡觉了。
这是我的 www 目录目前的样子:
这是我的 nginx 配置,我相信它在整个过程中发挥了作用:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/laravel/public;
index index.php index.html index.htm;
server_name www.mysite.me;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
【问题讨论】: