ホームステイで2つのラーベルプロジェクトを実行しています。プロジェクトが配置されている私のPCですべてがうまく動いています。しかし、ネットワーク上の他のコンピュータでは、動作しません。ホームステッドで実行されているLaravelプロジェクトを決定する方法
は、ここに私のHomestead.yamlです:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\Users\Lekz\development\projects\laravel
to: /home/vagrant/Code
sites:
- map: laravel.dev
to: /home/vagrant/Code/acctg_pending2/public
- map: homestead.app
to: /home/vagrant/Code/test/public
databases:
- addessa_acctg_pending
- testdb
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
そして、私のホストファイル:
# 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
# redirecting this is just a bad idea 127.0.0.1 localhost
# redirecting this is just a bad idea 127.0.0.1 localhost
# redirecting this is just a bad idea 127.0.0.1 localhost
# redirecting this is just a bad idea 127.0.0.1 localhost
# redirecting this is just a bad idea 127.0.0.1 localhost
#127.0.0.1 localhost
192.168.10.10 laravel.dev
192.168.10.10 homestead.app
私は私のPCで問題なく二つのプロジェクトを実行することができます。しかし、私がネットワーク上の他のコンピュータでこれらのプロジェクトを実行する傾向がある場合、それは機能しません。 2番目のプロジェクトは192.168.1._:8000 (my PC's IP)
と入力するだけです。
同じIPを持つネットワーク上の他のコンピュータのプロジェクトを特定するにはどうすればよいですか?私のhostsファイルのように:
192.168.10.10 laravel.dev
192.168.10.10 homestead.app
仮想サイトを/ var/apache2/sites-available/...またはこのように作成していますか? –
@QuỳnhNguyễn、どういう意味ですか?多分、私はそれをする方法を知らない。 –