我已经查看了类似问题的现有答案,但没有一个解决方案似乎适用于我。“没有指定输入文件”Laravel Homestead
导航到http://fresh.app:8000/
返回no input file specified
。尽管我的本地和虚拟环境同步(例如,在我的虚拟机上创建文件会在本地计算机上创建相应的文件)。
vagrant up
,vagrant ssh
工作并且不会产生任何错误。
我.ENV文件有APP_URL=fresh.app
我.homestead/Homestead.yaml
文件:
ip: "127.0.0.1"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Code
to: /home/vagrant/Code
sites:
- map: fresh.app
to: /home/vagrant/Code/fresh/public
databases:
- homestead
- fresh
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
在
/etc/hosts
,我的本地机器上,我有:
127.0.0.1 fresh.app
在我的虚拟机,在/etc/nginx/sites-available/fresh.app
:
server {
listen 80;
listen 443 ssl http2;
server_name fresh.app;
root "/home/vagrant/Code/fresh/public";
index index.html index.htm index.php;
...
任何想法?
你在'public'文件夹中有index.php文件吗? – Hollings
是的。 'fresh'文件夹包含'laravel new fresh'生成的所有文件,其中包含'public /'中的index.php文件 – 121c