0
在我的VM ubuntu32中,我安裝了nginx。localhost:8080沒有運行在獨角獸
http://192.168.11.8/
顯示歡迎使用nginx!頁。
我在vagrant dir中添加了rails應用程序。我安裝了麒麟寶石和railapp以下/配置/ unicorn.rb
working_directory File.expand_path("../..", __FILE__)
現在,當我運行
[email protected]:/vagrant$ bundle exec unicorn -c config/unicorn.rb
,它顯示了以下的我的終端。
[email protected]:/vagrant$ bundle exec unicorn -c config/unicorn.rb
I, [2013-11-02T03:53:34.983828 #19364] INFO -- : listening on addr=0.0.0.0:8080 fd=9
I, [2013-11-02T03:53:34.984324 #19364] INFO -- : worker=0 spawning...
I, [2013-11-02T03:53:34.985178 #19364] INFO -- : master process ready
I, [2013-11-02T03:53:34.986044 #19479] INFO -- : worker=0 spawned pid=19479
I, [2013-11-02T03:53:34.986595 #19479] INFO -- : Refreshing Gem list
I, [2013-11-02T03:53:37.303696 #19479] INFO -- : worker=0 ready
但是,當我訪問本地主機:8080時,它顯示「糟糕!Google Chrome無法連接到本地主機:8080」。
當我運行包EXEC軌s,則railsapp工作在
http://192.168.11.8:3000/
我在做什麼錯了?
在此先感謝。
您是在VM上還是在主機上運行Chrome? 'localhost'只能在虛擬機內工作,否則你需要使用虛擬機的IP地址。 – colinm
您是否將8080配置爲在您的Vagrantfile上轉發? – fgrehm