简体   繁体   English

如何在没有 Homestead 的情况下为 Laravel 项目提供服务?

[英]How to serve a Laravel project without Homestead?

I am beginning on Laravel and I have a quick question.我开始使用 Laravel,我有一个简单的问题。

I am going to undertake a small test.我要进行一个小测试。 I will be developing on Laravel under a Mac with Homestead and a Vagrant box.我将在带有 Homestead 和 Vagrant box 的 Mac 下在 Laravel 上进行开发。

My test project is going to be ran on an Ubuntu 16.04 with Php 7.我的测试项目将在带有 PHP 7 的 Ubuntu 16.04 上运行。

How can it be ran without Homestead or Vagrant?没有 Homestead 或 Vagrant 怎么能运行呢? Is this possible?这可能吗?

You can just use laravel valet你可以只使用laravel 代客

https://laravel.com/docs/5.7/valet https://laravel.com/docs/5.7/valet

Or php artisan serve或者php artisan serve

First, download and install lnmp .首先,下载并安装lnmp Then edit your nginx.conf file, copy the configuration from homestead to the new server.然后编辑您的 nginx.conf 文件,将配置从 homestead 复制到新服务器。 Finally, reload the nginx and php-fpm service.最后,重新加载 nginx 和 php-fpm 服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM