Laravel Homestead с несколькими сайтами в Windows - «Входной файл не указан». - PullRequest
0 голосов
/ 22 июня 2019

Вопрос

Что я делаю неправильно, что мешает Laravel Homestead отображать несколько сайтов?

Контекст

Я относительно новичок в Laravel и Homestead.Исторически я пользователь Mac & Linux, но в настоящее время на Windows 8.1.У меня есть Homestead и мой первый проект работает правильно.

Проблема

У меня есть Веб-сайт № 1, работающий должным образом и доступный с https://website1.test. Но Веб-сайт № 2 отображает «Нет входного файла»указано «.при доступе https://website2.test.

Факты

Homestead.yaml:

---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
mariadb: true
authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: C:\Users\{myUsername}\Projects
      to: /home/vagrant/code

sites:
    - map: website1.test
      to: /home/vagrant/code/website1.test/public
    - map: website2.test
      to: /home/vagrant/code/website2.test/public

databases:
    - homestead

variables:
      - key: APP_ENV
        value: local

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

C: \ Windows \ System32 \ drivers \etc \ hosts:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

192.168.10.10   website1.test
192.168.10.10   website2.test

.env:

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:gTjyUOqBKhYr75h4rU4TpsGaj/iejzieonLxvCpFwrY=
APP_DEBUG=true
APP_URL=https://website2.test

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

Что я пробовал

1 Ответ

1 голос
/ 22 июня 2019

Решение было исправить ошибку, которую я сделал.Когда я запустил laravel new из поля Homestead (vagrant ssh, затем cd /home/code), я поставил «.com» вместо «.test».

Удаление папки проекта и повторный запуск laravel new website2.testрешил проблему.

...