0
在Windows 10上,我跑了我的陰道,然後ssh成功進入我的虛擬主機。安裝apache2 php5-cli php5 libapache2-mod-php從流浪者的瀏覽器訪問網站
現在,當我訪問localhost:8080
它顯示我的Apache默認歡迎頁面。我如何在瀏覽器中訪問我的網站?
這裏是我的Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 80, host: 8080
end
其實應用程序不是我的根文件夾,而是api.dukaan.pk是我想同步的文件夾,但我在windows中 –
@RaheelKhan更改答案以共享完整目錄。應該在Windows上工作。如果它不嘗試指定「smb」作爲共享方法:'config.vm.synced_folder「。」,「/ var/www/html」,請輸入:「smb」'或安裝cygwin並使用rsync。 – tarleb
工作謝謝。你知道我該如何爲這個文件夾做一個虛擬主機?我在我的vm/etc/apache2/sites-available目錄中創建了api.dukaan.pk.conf文件。然後我運行sudo a2ensite api.dukaan.pk.conf。然後在我的Windows主機文件中,我添加了127.0.0.1 api.dukaan.pk 當我訪問api.dukaan.pk時,出現一個空白頁面 –